@Test public void testMaster() throws Exception { final JobId jobId = createAndAwaitJobRunning(); // shut down the agent so it cannot remove the tombstone we make agent.stopAsync().awaitTerminated(); // make sure things look correct before assertFalse(zkMasterModel.getJobs().isEmpty()); assertEquals(START, zkMasterModel.getDeployment(TEST_HOST, jobId).getGoal()); // undeploy job client.undeploy(jobId, TEST_HOST).get(); // These used to be filtered away assertNull(zkMasterModel.getDeployment(TEST_HOST, jobId)); assertTrue(zkMasterModel.getHostStatus(TEST_HOST).getJobs().isEmpty()); }