use of org.apache.flink.streaming.connectors.kinesis.testutils.FakeKinesisFanOutBehavioursFactory.AbstractSingleShardFanOutKinesisV2 in project flink by apache.
the class ShardConsumerFanOutTest method testStartFromLatestReceivesNoRecordsContinuesToUseTimestamp.
@Test
public void testStartFromLatestReceivesNoRecordsContinuesToUseTimestamp() throws Exception {
AbstractSingleShardFanOutKinesisV2 kinesis = FakeKinesisFanOutBehavioursFactory.emptyBatchFollowedBySingleRecord();
SequenceNumber sequenceNumber = SENTINEL_LATEST_SEQUENCE_NUM.get();
// Fake behaviour defaults to 10 messages
assertNumberOfMessagesReceivedFromKinesis(1, kinesis, sequenceNumber, efoProperties());
// This fake Kinesis will give 2 subscriptions
assertEquals(2, kinesis.getNumberOfSubscribeToShardInvocations());
assertEquals(AT_TIMESTAMP, kinesis.getStartingPositionForSubscription(0).type());
assertEquals(AT_TIMESTAMP, kinesis.getStartingPositionForSubscription(1).type());
}
Aggregations