Skip to content

Commit

Permalink
[#20967] CDCSDK: Fix testPgRegressReplicationSlot & TestReplicationSl…
Browse files Browse the repository at this point in the history
…otDropWithActiveInvalid

Summary:
In my recently landed change ([[ https://phorge.dev.yugabyte.com/D32470 | https://phorge.dev.yugabyte.com/D32470 ]]/ commit 1a36386), I changed the flag that guarded the addition of slot's entry in cdc_state table due to which some tests started failing. Earlier the flag used was `FLAGS_ysql_yb_enable_replication_commands` but since this flag was added to guard CRUD related changes, I replaced it with `FLAGS_ysql_TEST_enable_replication_slot_consumption` which is protecting changes related to the new consumption model of CDC.
Jira: DB-9942

Test Plan:
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressReplicationSlot#testPgRegressReplicationSlot'
/yb_build.sh --cxx-test integration-tests_cdcsdk_ysql-test --gtest_filter CDCSDKYsqlTest.TestReplicationSlotDropWithActiveInvalid

Reviewers: stiwary

Reviewed By: stiwary

Subscribers: ycdcxcluster, jason

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D32925
  • Loading branch information
siddharth2411 committed Mar 8, 2024
1 parent 4082892 commit bf9eafd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ protected Map<String, String> getTServerFlags() {
"ysql_yb_enable_replication_commands,yb_enable_cdc_consistent_snapshot_streams");
flagMap.put("ysql_yb_enable_replication_commands", "true");
flagMap.put("yb_enable_cdc_consistent_snapshot_streams", "true");
flagMap.put("ysql_TEST_enable_replication_slot_consumption", "true");
return flagMap;
}

Expand All @@ -45,6 +46,7 @@ protected Map<String, String> getMasterFlags() {
"ysql_yb_enable_replication_commands,yb_enable_cdc_consistent_snapshot_streams");
flagMap.put("ysql_yb_enable_replication_commands", "true");
flagMap.put("yb_enable_cdc_consistent_snapshot_streams", "true");
flagMap.put("ysql_TEST_enable_replication_slot_consumption", "true");
return flagMap;
}

Expand Down
1 change: 1 addition & 0 deletions src/yb/integration-tests/cdcsdk_ysql-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7666,6 +7666,7 @@ TEST_F(CDCSDKYsqlTest, TestReplicationSlotDropWithActiveInvalid) {
ANNOTATE_UNPROTECTED_WRITE(FLAGS_ysql_cdc_active_replication_slot_window_ms) =
10000 * yb::kTimeMultiplier;
ANNOTATE_UNPROTECTED_WRITE(FLAGS_yb_enable_cdc_consistent_snapshot_streams) = true;
ANNOTATE_UNPROTECTED_WRITE(FLAGS_ysql_TEST_enable_replication_slot_consumption) = true;

ASSERT_OK(SetUpWithParams(3, 1, false));
auto table =
Expand Down

0 comments on commit bf9eafd

Please sign in to comment.