tillrohrmann commented on a change in pull request #12399:
URL: https://github.com/apache/flink/pull/12399#discussion_r438132048
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskSubmissionTestEnvironment.java
##########
@@ -167,6 +156,21 @@ private TaskSubmissionTestEnvironment(
taskExecutor.start();
taskExecutor.waitUntilStarted();
+
+ this.threadSafeTaskSlotTable = new
ThreadSafeTaskSlotTable<>(taskSlotTable,
taskExecutor.getMainThreadExecutableForTesting());
+
+ TaskManagerActions taskManagerActions;
+ if (taskManagerActionListeners.size() == 0) {
+ taskManagerActions = new NoOpTaskManagerActions();
+ } else {
+ TestTaskManagerActions testTaskManagerActions = new
TestTaskManagerActions(threadSafeTaskSlotTable, jobMasterGateway);
+ for (Tuple3<ExecutionAttemptID, ExecutionState,
CompletableFuture<Void>> listenerTuple : taskManagerActionListeners) {
+
testTaskManagerActions.addListener(listenerTuple.f0, listenerTuple.f1,
listenerTuple.f2);
+ }
+ taskManagerActions = testTaskManagerActions;
+ }
+
+ registerJobMasterConnection(jobTable, jobId, testingRpcService,
jobMasterGateway, taskManagerActions, timeout);
Review comment:
I think this does not work @xintongsong because we are accessing the
`jobTable` from outside of the main thread. This causes
https://issues.apache.org/jira/browse/FLINK-18233 (at least one of the failing
test cases).
----------------------------------------------------------------
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]