ericxiao251 commented on code in PR #22438:
URL: https://github.com/apache/flink/pull/22438#discussion_r1177975477


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java:
##########
@@ -283,6 +283,25 @@ public void testTransformationSetParallelism() {
         assertThat(vertices.get(2).isParallelismConfigured()).isTrue();
     }
 
+    @Test
+    public void testTransformationSetMaxParallelism() {
+        StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
+        /* The max parallelism of the environment (that is inherited by the 
source)
+        and the parallelism of the map operator needs to be different for this 
test */
+        env.setMaxParallelism(4);
+        env.fromSequence(1L, 3L).map(i -> 
i).setMaxParallelism(10).print().setMaxParallelism(20);

Review Comment:
   Oh funny, DataStreamSink doesn't have `getId()` as well, I can add that to 
this PR or create a new issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to