DBZ-4727 Adjust chunk size for pause test

This commit is contained in:
Chris Cranford 2022-07-30 15:19:47 -04:00
parent a330b7da66
commit 0ee30e2115
No known key found for this signature in database
GPG Key ID: 8B8088D41181D04B

View File

@ -813,7 +813,7 @@ public void shouldSnapshotNewlyAddedTableToIncludeListAfterRestart() throws Exce
@Test
public void testPauseDuringSnapshot() throws Exception {
populateTable();
startConnector(x -> x.with(CommonConnectorConfig.INCREMENTAL_SNAPSHOT_CHUNK_SIZE, 1));
startConnector(x -> x.with(CommonConnectorConfig.INCREMENTAL_SNAPSHOT_CHUNK_SIZE, 50));
waitForConnectorToStart();
waitForAvailableRecords(1, TimeUnit.SECONDS);
@ -842,9 +842,11 @@ public void testPauseDuringSnapshot() throws Exception {
sendResumeSignal();
final int expectedRecordCount = ROW_COUNT;
Map<Integer, Integer> dbChanges = consumeMixedWithIncrementalSnapshot(expectedRecordCount - beforeResume);
for (int i = beforeResume + 1; i < expectedRecordCount; i++) {
Assertions.assertThat(dbChanges).includes(MapAssert.entry(i + 1, i));
if ((expectedRecordCount - beforeResume) > 0) {
Map<Integer, Integer> dbChanges = consumeMixedWithIncrementalSnapshot(expectedRecordCount - beforeResume);
for (int i = beforeResume + 1; i < expectedRecordCount; i++) {
Assertions.assertThat(dbChanges).includes(MapAssert.entry(i + 1, i));
}
}
}