dawidwys 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_r259304026
 
 

 ##########
 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:
   Shouldn't all `DisabledAutoUID*` tests fail currently? Each of the test have 
operators without uids assigned (e.g. `.map(new NoOpIntMap())`, `.addSink(new 
DiscardingSink<>())`),

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to