shuai-xu commented on a change in pull request #7227: [FLINK-11059] [runtime]
do not add releasing failed slot to free slots
URL: https://github.com/apache/flink/pull/7227#discussion_r293285690
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java
##########
@@ -1662,6 +1665,82 @@ public void testTerminationOnFatalError() throws
Throwable {
}
}
+ /**
+ * Tests that task manager will sync slot with job master throw
heartbeat (See FLINK-11059).
+ */
+ @Test(timeout = 10000L)
+ public void testSyncSlotsWithJobMasterByHeartbeat() throws Exception {
+ final TaskSlotTable taskSlotTable = new TaskSlotTable(
+ Arrays.asList(ResourceProfile.UNKNOWN,
ResourceProfile.UNKNOWN),
+ timerService);
+ final TaskManagerServices taskManagerServices = new
TaskManagerServicesBuilder().setTaskSlotTable(taskSlotTable).build();
+
+ final TaskExecutor taskExecutor =
createTaskExecutor(taskManagerServices);
+
+ final TestingResourceManagerGateway
testingResourceManagerGateway = new TestingResourceManagerGateway();
+
+ final CompletableFuture<AllocationID> allocationNotifiedFree =
new CompletableFuture<>();
+
+ final CompletableFuture<Void> initialSlotReportFuture = new
CompletableFuture<>();
+
testingResourceManagerGateway.setSendSlotReportFunction(resourceIDInstanceIDSlotReportTuple3
-> {
+ initialSlotReportFuture.complete(null);
Review comment:
OK
----------------------------------------------------------------
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