tillrohrmann commented on a change in pull request #10361: [FLINK-14795][tests] 
Rework TaskExecutorPartitionLifecycleTest
URL: https://github.com/apache/flink/pull/10361#discussion_r353878882
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
 ##########
 @@ -194,7 +183,8 @@ private void 
testJobMasterConnectionTerminationAfterExternalReleaseOrPromotion(T
                                
TaskExecutorPartitionInfo.from(resultPartitionDeploymentDescriptor)));
 
                        final CompletableFuture<Collection<ResultPartitionID>> 
firstReleasePartitionsCallFuture = new CompletableFuture<>();
-                       runInTaskExecutorThreadAndWait(taskExecutor, () -> 
shuffleEnvironment.releasePartitionsLocallyFuture = 
firstReleasePartitionsCallFuture);
+                       runInTaskExecutorThreadAndWait(taskExecutor, () -> 
partitionTracker.setStopTrackingAndReleasePartitionsConsumer(firstReleasePartitionsCallFuture::complete));
+                       runInTaskExecutorThreadAndWait(taskExecutor, () -> 
partitionTracker.setIsTrackingPartitionsForFunction(jobId -> true));
 
 Review comment:
   I think it would be a bit nicer to move these test arrangements to the top 
of the test. One could even set them when creating the 
`TestingTaskExecutorPartitionTracker` (e.g. via a builder). Then one would not 
have to run these things in the task executor thread and one would not mix act 
logic with arrange logic.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to