public class ParallelSnapshotReaderTest extends Object
| Constructor and Description |
|---|
ParallelSnapshotReaderTest() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.kafka.connect.source.SourceRecord |
createSourceRecordWithTimestamp(Instant ts)
Create an "offset" containing a single timestamp element with the given value.
|
void |
pollCombinesBothReadersPolls() |
void |
pollReturnsNewIfOldReaderIsStopped() |
void |
pollReturnsNullIfBothReadersAreStopped() |
void |
pollReturnsOldIfNewReaderIsStopped() |
void |
startStartsBothReaders() |
void |
testHaltingPredicateFlipsthisReaderNearEnd() |
void |
testHaltingPredicateHalts() |
void |
testHaltingPredicateHonorsTimeRange() |
void |
testStopStopsBothReaders() |
public void startStartsBothReaders()
public void pollCombinesBothReadersPolls()
throws InterruptedException
InterruptedExceptionpublic void pollReturnsNewIfOldReaderIsStopped()
throws InterruptedException
InterruptedExceptionpublic void pollReturnsOldIfNewReaderIsStopped()
throws InterruptedException
InterruptedExceptionpublic void pollReturnsNullIfBothReadersAreStopped()
throws InterruptedException
InterruptedExceptionpublic void testStopStopsBothReaders()
public void testHaltingPredicateHonorsTimeRange()
public void testHaltingPredicateFlipsthisReaderNearEnd()
public void testHaltingPredicateHalts()
private org.apache.kafka.connect.source.SourceRecord createSourceRecordWithTimestamp(Instant ts)
ParallelSnapshotReader.ParallelHaltingPredicate halts based on how
close the record's timestamp is to the present time.tsSec - the timestamp in the resulting offset.Copyright © 2019 JBoss by Red Hat. All rights reserved.