use of software.amazon.awssdk.services.kinesis.model.ResourceNotFoundException in project flink by apache.
the class FanOutRecordPublisherTest method testShardConsumerCompletesIfResourceNotFoundExceptionThrownFromSubscription.
@Test
public void testShardConsumerCompletesIfResourceNotFoundExceptionThrownFromSubscription() throws Exception {
ResourceNotFoundException exception = ResourceNotFoundException.builder().build();
SubscriptionErrorKinesisV2 kinesis = FakeKinesisFanOutBehavioursFactory.errorDuringSubscription(exception);
RecordPublisher recordPublisher = createRecordPublisher(kinesis);
TestConsumer consumer = new TestConsumer();
assertEquals(COMPLETE, recordPublisher.run(consumer));
// Will exit on the first subscription
assertEquals(1, kinesis.getNumberOfSubscribeToShardInvocations());
}
Aggregations