use of org.apache.flink.streaming.connectors.kinesis.testutils.FakeKinesisFanOutBehavioursFactory.StreamConsumerFakeKinesis in project flink by apache.
the class StreamConsumerRegistrarTest method testRegisterStreamConsumerTimeoutWaitingForConsumerToBecomeActive.
@Test
public void testRegisterStreamConsumerTimeoutWaitingForConsumerToBecomeActive() throws Exception {
thrown.expect(FlinkKinesisTimeoutException.class);
thrown.expectMessage("Timeout waiting for stream consumer to become active: name on stream-arn");
StreamConsumerFakeKinesis kinesis = FakeKinesisFanOutBehavioursFactory.registerExistingConsumerAndWaitToBecomeActive();
Properties configProps = createEfoProperties();
configProps.setProperty(REGISTER_STREAM_TIMEOUT_SECONDS, "1");
FanOutRecordPublisherConfiguration configuration = new FanOutRecordPublisherConfiguration(configProps, singletonList(STREAM));
StreamConsumerRegistrar registrar = new StreamConsumerRegistrar(kinesis, configuration, backoffFor(1001));
registrar.registerStreamConsumer(STREAM, "name");
}
Aggregations