Class ParallelSnapshotReaderTest
- java.lang.Object
-
- io.debezium.connector.mysql.legacy.ParallelSnapshotReaderTest
-
public class ParallelSnapshotReaderTest extends Object
- Author:
- Moira Tagle
-
-
Constructor Summary
Constructors Constructor Description ParallelSnapshotReaderTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.apache.kafka.connect.source.SourceRecordcreateSourceRecordWithTimestamp(Instant ts)Create an "offset" containing a single timestamp element with the given value.voidpollCombinesBothReadersPolls()voidpollReturnsNewIfOldReaderIsStopped()voidpollReturnsNullIfBothReadersAreStopped()voidpollReturnsOldIfNewReaderIsStopped()voidstartStartsBothReaders()voidtestHaltingPredicateFlipsthisReaderNearEnd()voidtestHaltingPredicateHalts()voidtestHaltingPredicateHonorsTimeRange()voidtestStopStopsBothReaders()
-
-
-
Method Detail
-
startStartsBothReaders
public void startStartsBothReaders()
-
pollCombinesBothReadersPolls
public void pollCombinesBothReadersPolls() throws InterruptedException- Throws:
InterruptedException
-
pollReturnsNewIfOldReaderIsStopped
public void pollReturnsNewIfOldReaderIsStopped() throws InterruptedException- Throws:
InterruptedException
-
pollReturnsOldIfNewReaderIsStopped
public void pollReturnsOldIfNewReaderIsStopped() throws InterruptedException- Throws:
InterruptedException
-
pollReturnsNullIfBothReadersAreStopped
public void pollReturnsNullIfBothReadersAreStopped() throws InterruptedException- Throws:
InterruptedException
-
testStopStopsBothReaders
public void testStopStopsBothReaders()
-
testHaltingPredicateHonorsTimeRange
public void testHaltingPredicateHonorsTimeRange()
-
testHaltingPredicateFlipsthisReaderNearEnd
public void testHaltingPredicateFlipsthisReaderNearEnd()
-
testHaltingPredicateHalts
public void testHaltingPredicateHalts()
-
createSourceRecordWithTimestamp
private org.apache.kafka.connect.source.SourceRecord createSourceRecordWithTimestamp(Instant ts)
Create an "offset" containing a single timestamp element with the given value. Needed becauseParallelSnapshotReader.ParallelHaltingPredicatehalts based on how close the record's timestamp is to the present time.- Parameters:
tsSec- the timestamp in the resulting offset.- Returns:
- an "offset" containing the given timestamp.
-
-