reswqa commented on code in PR #19927:
URL: https://github.com/apache/flink/pull/19927#discussion_r896405257


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java:
##########
@@ -1201,6 +1243,33 @@ private void verifyFractions(
                 delta);
     }
 
+    @Test
+    public void testSetNonDefaultSlotSharingInHybridMode() {
+        Configuration configuration = new Configuration();
+        // set all edge to HYBRID result partition type.
+        configuration.set(
+                ExecutionOptions.BATCH_SHUFFLE_MODE,
+                BatchShuffleMode.EXPERIMENTAL_ALL_EXCHANGES_HYBRID);
+
+        final StreamGraph streamGraph = 
createStreamGraphForSlotSharingTest(configuration);
+        // specify slot sharing group for map1
+        streamGraph.getStreamNodes().stream()
+                .filter(n -> "map1".equals(n.getOperatorName()))
+                .findFirst()
+                .get()
+                .setSlotSharingGroup("testSlotSharingGroup");
+
+        try {
+            StreamingJobGraphGenerator.createJobGraph(streamGraph);
+            fail("hybrid shuffle mode with non default slot sharing group 
should failed.");
+        } catch (IllegalStateException e) {
+            assertTrue(
+                    e.getMessage()
+                            .contains(
+                                    "hybrid shuffle mode currently does not 
support setting slot sharing group"));

Review Comment:
   > This should use assertj's assertThatThrownby()
   
   nice suggestion, i have fixed it.



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