DBZ-4727 Adjust chunk size for pause test
This commit is contained in:
parent
a330b7da66
commit
0ee30e2115
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user