tillrohrmann commented on a change in pull request #6464: [FLINK-9936][mesos] 
WIP 
URL: https://github.com/apache/flink/pull/6464#discussion_r207294205
 
 

 ##########
 File path: 
flink-mesos/src/test/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManagerTest.java
 ##########
 @@ -807,4 +807,21 @@ public void testDisconnected() throws Exception {
                        
resourceManager.taskRouter.expectMsgClass(Disconnected.class);
                }};
        }
+
+       @Test
+       public void testClearStateRevokeLeadership() throws Exception {
+               new Context() {{
+                       MesosWorkerStore.Worker worker1 = 
MesosWorkerStore.Worker.newWorker(task1).launchWorker(slave1, slave1host);
+                       
when(rmServices.workerStore.getFrameworkID()).thenReturn(Option.apply(framework1));
+                       
when(rmServices.workerStore.recoverWorkers()).thenReturn(Collections.singletonList(worker1)).thenReturn(Collections.emptyList());
+
+                       startResourceManager();
+                       rmServices.rmLeaderElectionService.notLeader();
+                       rmServices.grantLeadership();
+
+                       //resourceManager.stateCleared.await(5, 
TimeUnit.SECONDS);
 
 Review comment:
   Can this line be removed?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to