Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/4509#discussion_r152862469
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannelTest.java
---
@@ -475,16 +515,10 @@ public Void call() throws Exception {
};
// Submit tasks and wait to finish
- final List<Future<Void>> results =
Lists.newArrayListWithCapacity(2);
- results.add(executor.submit(requestBufferTask));
- results.add(executor.submit(releaseTask));
- for (Future<Void> result : results) {
- result.get();
- }
+ submitTasksAndWaitResults(executor, new
Callable[]{requestBufferTask, releaseTask});
assertEquals("There should be no buffers available in
the channel.",
0, inputChannel.getNumberOfAvailableBuffers());
--- End diff --
please add:
```
assertEquals("There should be 130 buffers available in
local pool.",
130,
bufferPool.getNumberOfAvailableMemorySegments() +
networkBufferPool.getNumberOfAvailableMemorySegments());
```
(buffers could be in either buffer pool depending on whether they were
requested at least once from the `LocalBufferPool` or not)
---