flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] tillrohrmann commented on a change in pull request #6464: [FLINK-9936][mesos] WIP
Date Thu, 02 Aug 2018 17:06:16 GMT
tillrohrmann commented on a change in pull request #6464: [FLINK-9936][mesos] WIP 
URL: https://github.com/apache/flink/pull/6464#discussion_r207302752
 
 

 ##########
 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);
+			assertThat(resourceManager.workersInLaunch.size(), equalTo(0));
+			verify(rmServices.schedulerDriver).stop(true);
 
 Review comment:
   Is the test already complete?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message