use of org.apache.flink.streaming.util.TestAnyModeReadingStreamOperator in project flink by apache.
the class StreamTaskSelectiveReadingTest method testAnyOrderedReading.
@Test
public void testAnyOrderedReading() throws Exception {
ConcurrentLinkedQueue<Object> expectedOutput = new ConcurrentLinkedQueue<>();
expectedOutput.add(new StreamRecord<>("[Operator0-1]: Hello-1"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 1"));
expectedOutput.add(new StreamRecord<>("[Operator0-1]: Hello-2"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 2"));
expectedOutput.add(new StreamRecord<>("[Operator0-1]: Hello-3"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 3"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 4"));
testBase(new TestAnyModeReadingStreamOperator("Operator0"), true, expectedOutput, true);
}
use of org.apache.flink.streaming.util.TestAnyModeReadingStreamOperator in project flink by apache.
the class StreamTaskSelectiveReadingTest method testAnyUnorderedReading.
@Test
public void testAnyUnorderedReading() throws Exception {
ConcurrentLinkedQueue<Object> expectedOutput = new ConcurrentLinkedQueue<>();
expectedOutput.add(new StreamRecord<>("[Operator0-1]: Hello-1"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 1"));
expectedOutput.add(new StreamRecord<>("[Operator0-1]: Hello-2"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 2"));
expectedOutput.add(new StreamRecord<>("[Operator0-1]: Hello-3"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 3"));
expectedOutput.add(new StreamRecord<>("[Operator0-2]: 4"));
testBase(new TestAnyModeReadingStreamOperator("Operator0"), false, expectedOutput, false);
}
use of org.apache.flink.streaming.util.TestAnyModeReadingStreamOperator in project flink by apache.
the class StreamingJobGraphGeneratorTest method testNotSupportInputSelectableOperatorIfCheckpointing.
@Test(expected = UnsupportedOperationException.class)
public void testNotSupportInputSelectableOperatorIfCheckpointing() {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.enableCheckpointing(60_000L);
DataStreamSource<String> source1 = env.fromElements("1");
DataStreamSource<Integer> source2 = env.fromElements(1);
source1.connect(source2).transform("test", BasicTypeInfo.STRING_TYPE_INFO, new TestAnyModeReadingStreamOperator("test operator")).print();
StreamingJobGraphGenerator.createJobGraph(env.getStreamGraph());
}
Aggregations