use of org.apache.flink.streaming.util.MockSerializationSchema in project flink by splunk.
the class FlinkKinesisProducerTest method testOpen.
@Test
public void testOpen() throws Exception {
MockSerializationSchema<Object> serializationSchema = new MockSerializationSchema<>();
Properties config = TestUtils.getStandardProperties();
FlinkKinesisProducer<Object> producer = new FlinkKinesisProducer<>(serializationSchema, config);
AbstractStreamOperatorTestHarness<Object> testHarness = new AbstractStreamOperatorTestHarness<>(new StreamSink<>(producer), 1, 1, 0);
testHarness.open();
assertThat("Open method was not called", serializationSchema.isOpenCalled(), is(true));
}
use of org.apache.flink.streaming.util.MockSerializationSchema in project flink by apache.
the class FlinkKinesisProducerTest method testOpen.
@Test
public void testOpen() throws Exception {
MockSerializationSchema<Object> serializationSchema = new MockSerializationSchema<>();
Properties config = TestUtils.getStandardProperties();
FlinkKinesisProducer<Object> producer = new FlinkKinesisProducer<>(serializationSchema, config);
AbstractStreamOperatorTestHarness<Object> testHarness = new AbstractStreamOperatorTestHarness<>(new StreamSink<>(producer), 1, 1, 0);
testHarness.open();
assertThat("Open method was not called", serializationSchema.isOpenCalled(), is(true));
}
use of org.apache.flink.streaming.util.MockSerializationSchema in project flink-mirror by flink-ci.
the class FlinkKinesisProducerTest method testOpen.
@Test
public void testOpen() throws Exception {
MockSerializationSchema<Object> serializationSchema = new MockSerializationSchema<>();
Properties config = TestUtils.getStandardProperties();
FlinkKinesisProducer<Object> producer = new FlinkKinesisProducer<>(serializationSchema, config);
AbstractStreamOperatorTestHarness<Object> testHarness = new AbstractStreamOperatorTestHarness<>(new StreamSink<>(producer), 1, 1, 0);
testHarness.open();
assertThat("Open method was not called", serializationSchema.isOpenCalled(), is(true));
}
Aggregations