tillrohrmann commented on a change in pull request #10362:
[FLINK-14792][coordination] Implement TE cluster partition release
URL: https://github.com/apache/flink/pull/10362#discussion_r394501766
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
##########
@@ -263,6 +264,24 @@ public void testPartitionPromotion() throws Exception {
);
}
+ @Test
+ public void testClusterPartitionRelease() throws Exception {
+ testPartitionRelease(
+ partitionTracker -> {
+ final
CompletableFuture<Collection<IntermediateDataSetID>> releasePartitionsFuture =
new CompletableFuture<>();
+
partitionTracker.setReleaseClusterPartitionsConsumer(releasePartitionsFuture::complete);
+ return releasePartitionsFuture;
+ },
+ (jobId, partitionId, taskExecutor, taskExecutorGateway,
releasePartitionsFuture) -> {
+ final IntermediateDataSetID dataSetId = new
IntermediateDataSetID();
+
+
taskExecutorGateway.releaseClusterPartitions(Collections.singleton(dataSetId));
+
+ assertThat(releasePartitionsFuture.get(),
hasItems(dataSetId));
+ }
+ );
+ }
Review comment:
We actually have this tested in
`TaskExecutorPartitionTrackerImplTest.stopTrackingAndReleaseClusterPartitions`.
Hence, I think this test does not add much. I think the problem is a bit that
it is not easy to spin up a `TaskExecutor` instance for testing these
forwarding calls.
----------------------------------------------------------------
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