zentol commented on a change in pull request #13473: URL: https://github.com/apache/flink/pull/13473#discussion_r496578717
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphConstructionTest.java ########## @@ -61,6 +66,36 @@ private ExecutionGraph createExecutionGraph() throws Exception { return TestingExecutionGraphBuilder.newBuilder().build(); } + @Test + public void testExecutionAttemptIdInTwoIdenticalJobsIsNotSame() throws Exception { + JobVertex v1 = new JobVertex("vertex1"); + JobVertex v2 = new JobVertex("vertex2"); + JobVertex v3 = new JobVertex("vertex3"); + + v1.setParallelism(5); + v2.setParallelism(7); + v3.setParallelism(2); + + v1.setInvokableClass(AbstractInvokable.class); + v2.setInvokableClass(AbstractInvokable.class); + v3.setInvokableClass(AbstractInvokable.class); + + List<JobVertex> ordered = new ArrayList<>(Arrays.asList(v1, v2, v3)); + + ExecutionGraph eg1 = createExecutionGraph(); + ExecutionGraph eg2 = createExecutionGraph(); + try { + eg1.attachJobGraph(ordered); + eg2.attachJobGraph(ordered); + } + catch (JobException e) { + e.printStackTrace(); + fail("Job failed with exception: " + e.getMessage()); Review comment: I don't see a need for an explicit catch block ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org