zhuzhurk commented on a change in pull request #10255: [FLINK-14859][runtime] 
Avoid leaking unassigned slots 
URL: https://github.com/apache/flink/pull/10255#discussion_r348391501
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/TestExecutionSlotAllocator.java
 ##########
 @@ -126,4 +131,13 @@ public void cancel(final ExecutionVertexID 
executionVertexId) {
        public CompletableFuture<Void> stop() {
                return CompletableFuture.completedFuture(null);
        }
+
+       @Override
+       public void returnLogicalSlot(final LogicalSlot logicalSlot) {
+               returnedSlots.add(logicalSlot);
+       }
+
+       public List<LogicalSlot> getReturnedSlots() {
+               return new ArrayList<>(returnedSlots);
 
 Review comment:
   Would `Collections.unmodifiable()` work here?

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to