Class ParallelSnapshotReaderTest

java.lang.Object
io.debezium.connector.mysql.legacy.ParallelSnapshotReaderTest

public class ParallelSnapshotReaderTest extends Object
Author:
Moira Tagle
  • Constructor Details

    • ParallelSnapshotReaderTest

      public ParallelSnapshotReaderTest()
  • Method Details

    • 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 because ParallelSnapshotReader.ParallelHaltingPredicate halts based on how close the record's timestamp is to the present time.
      Parameters:
      ts - the timestamp in the resulting offset.
      Returns:
      an "offset" containing the given timestamp.