use of org.apache.flink.streaming.connectors.kinesis.testutils.FakeKinesisFanOutBehavioursFactory.SingleShardFanOutKinesisV2 in project flink by apache.
the class FanOutRecordPublisherTest method testToSdkV2StartingPositionAtTimeStamp.
@Test
public void testToSdkV2StartingPositionAtTimeStamp() throws Exception {
SingleShardFanOutKinesisV2 kinesis = emptyShard();
Date now = new Date();
RecordPublisher publisher = createRecordPublisher(kinesis, StartingPosition.fromTimestamp(now));
publisher.run(new TestConsumer());
assertEquals(now.toInstant(), kinesis.getStartingPositionForSubscription(0).timestamp());
assertEquals(AT_TIMESTAMP, kinesis.getStartingPositionForSubscription(0).type());
}
use of org.apache.flink.streaming.connectors.kinesis.testutils.FakeKinesisFanOutBehavioursFactory.SingleShardFanOutKinesisV2 in project flink by apache.
the class FanOutRecordPublisherTest method testToSdkV2StartingPositionLatest.
@Test
public void testToSdkV2StartingPositionLatest() throws Exception {
SingleShardFanOutKinesisV2 kinesis = emptyShard();
RecordPublisher publisher = createRecordPublisher(kinesis, latest());
publisher.run(new TestConsumer());
assertNull(kinesis.getStartingPositionForSubscription(0).sequenceNumber());
assertEquals(LATEST, kinesis.getStartingPositionForSubscription(0).type());
}
Aggregations