Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDC partial reset acceptance test #14551

Merged
merged 16 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ public void testSyncAfterUpgradeToPerStreamState(final TestInfo testInfo) throws

// sync one more time. verify it is the equivalent of a full refresh.
final String expectedState =
"{\"cdc\":false,\"streams\":[{\"cursor\":\"6\",\"stream_name\":\"id_and_name\",\"cursor_field\":[\"id\"],\"stream_namespace\":\"public\"}]}";
"{\"cursor\":\"6\",\"stream_name\":\"id_and_name\",\"cursor_field\":[\"id\"],\"stream_namespace\":\"public\"}";
LOGGER.info("Starting {} sync 3", testInfo.getDisplayName());
final JobInfoRead connectionSyncRead3 =
apiClient.getConnectionApi().syncConnection(new ConnectionIdRequestBody().connectionId(connectionId));
Expand All @@ -806,7 +806,11 @@ public void testSyncAfterUpgradeToPerStreamState(final TestInfo testInfo) throws
LOGGER.info("state after sync 3: {}", state);

testHarness.assertSourceAndDestinationDbInSync(WITHOUT_SCD_TABLE);
assertEquals(Jsons.deserialize(expectedState), state.getState());
assertNotNull(state.getStreamState());
assertEquals(1, state.getStreamState().size());
final StreamState idAndNameState = state.getStreamState().get(0);
assertEquals(new StreamDescriptor().namespace("public").name(STREAM_NAME), idAndNameState.getStreamDescriptor());
assertEquals(Jsons.deserialize(expectedState), idAndNameState.getStreamState());
}

@Test
Expand Down
Loading