Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/4581#discussion_r152918323
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartitionTest.java
---
@@ -300,6 +315,230 @@ public void
testConsumeSpillablePartitionSpilledDuringConsume() throws Exception
assertTrue(buffer.isRecycled());
}
+ /**
+ * Tests {@link SpillableSubpartition#add(Buffer)} with a spillable
finished partition.
+ */
+ @Test
+ public void testAddOnFinishedSpillablePartition() throws Exception {
+ SpillableSubpartition partition = createSubpartition();
+ partition.finish();
+
+ Buffer buffer = new
Buffer(MemorySegmentFactory.allocateUnpooledSegment(4096),
+ FreeingBufferRecycler.INSTANCE);
+ try {
+ partition.add(buffer);
+ } finally {
--- End diff --
Oh right, sorry my bad :) I don't know I thought that it will somehow
swallow the exceptions :)
---