zhuzhurk commented on code in PR #24475: URL: https://github.com/apache/flink/pull/24475#discussion_r1524742606
########## flink-core/src/test/java/org/apache/flink/api/dag/TransformationTest.java: ########## @@ -42,10 +43,21 @@ public class TransformationTest extends TestLogger { private Transformation<Void> transformation; + private Transformation<Void> transformationWithInput; @Before public void setUp() { transformation = new TestTransformation<>("t", null, 1); + transformationWithInput = + new TestTransformationWithInput<>( + "t", null, 1, Arrays.asList(transformation, transformation)); + } + + @Test + public void testPredecessorCache() throws Exception { + transformationWithInput.getTransitivePredecessors(); + assertEquals(transformationWithInput.getPredecessorsCache().size(), 1); + assertEquals(((TestTransformation<?>) transformation).getNumGetTransitivePredecessor(), 1); } Review Comment: Can we verify the result of `topNode.getTransitivePredecessors()`? Ideally it should be 3. But without the fix it will be 4. -- 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