sjwiesman commented on a change in pull request #7747: 
[FLINK-11653][DataStream] Add configuration to enforce custom UID's o…
URL: https://github.com/apache/flink/pull/7747#discussion_r259348263
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java
 ##########
 @@ -305,4 +308,52 @@ public void invoke(Integer value) throws Exception {
                        }
                }
        }
+
+       @Test(expected = IllegalStateException.class)
+       public void testDisabledAutoUIDGenerator() {
+               StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
+               env.getConfig().disableAutoGeneratedUIDs();
+
+               env.fromElements(1, 2, 3).map(new NoOpIntMap()).addSink(new 
DiscardingSink<>());
+               StreamingJobGraphGenerator.createJobGraph(env.getStreamGraph());
+
+               Assert.fail("Accepted job graph without manually set UIDs");
+       }
+
+       @Test
+       public void testDisabledAutoUIDWithManuallySetId() {
 
 Review comment:
   No, again because of operator chaining. That’s why the third test explicitly 
disables chaining in one place to check that condition.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to