zhijiangW commented on a change in pull request #8687: 
[FLINK-12612][coordination] Track stored partition on the TaskExecutor 
URL: https://github.com/apache/flink/pull/8687#discussion_r293222051
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorPartitionLifecycleTest.java
 ##########
 @@ -102,6 +126,115 @@ public void setup() {
                rpc = new TestingRpcService();
        }
 
+       @Test
+       public void testConnectionTerminationAfterExternalRelease() throws 
IOException, InterruptedException, ExecutionException, TimeoutException {
+               final JobMasterId jobMasterId = JobMasterId.generate();
+
+               final LibraryCacheManager libraryCacheManager = 
mock(LibraryCacheManager.class);
+               
when(libraryCacheManager.getClassLoader(any(JobID.class))).thenReturn(ClassLoader.getSystemClassLoader());
+
+               final JobMasterGateway jobMasterGateway = 
mock(JobMasterGateway.class);
+               
when(jobMasterGateway.getFencingToken()).thenReturn(jobMasterId);
+
+               final TaskManagerActions taskManagerActions = new 
NoOpTaskManagerActions();
+               final JobManagerConnection jobManagerConnection = new 
JobManagerConnection(
 
 Review comment:
   We might use 
`TaskSubmissionTestEnvironment.createJobManagerConnection(jobId, 
jobMasterGateway, rpc, taskManagerActions, Time.milliseconds(10000L))` instead 
to avoid mock above `libraryCacheManager` explicitly.

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