Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/4581#discussion_r152845922
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/ResultPartitionTest.java
---
@@ -145,6 +165,45 @@ protected void testAddOnReleasedPartition(final
ResultPartitionType pipelined)
}
}
+ @Test
+ public void testAddOnPipelinedPartition() throws Exception {
+ testAddOnPartition(ResultPartitionType.PIPELINED);
+ }
+
+ @Test
+ public void testAddOnBlockingPartition() throws Exception {
+ testAddOnPartition(ResultPartitionType.BLOCKING);
+ }
+
+ /**
+ * Tests {@link ResultPartition#add} on a working partition.
+ *
+ * @param pipelined the result partition type to set up
+ */
+ protected void testAddOnPartition(final ResultPartitionType pipelined)
+ throws Exception {
+ ResultPartitionConsumableNotifier notifier =
mock(ResultPartitionConsumableNotifier.class);
--- End diff --
do you think it's better to have a real implementation of that interface,
spy on it, and then verify the expected method calls? - this actually seems
like some more overhead with little/no gain. I'd prefer to leave it as is for
now.
---