Esempio n. 1
0
  @Test
  public void test_302_2_Pause() throws Exception {
    req_094_Util.getWorkerStatus(WorkerStatus.OWNER);

    req_087_Util.pauseOwnerWorker(component);

    req_094_Util.getWorkerStatus(WorkerStatus.OWNER);
  }
  @Test
  public void test_322_17_Pause() throws Exception {
    WorkerStatusDAO workerStatus = WorkerDAOFactory.getInstance().getWorkerStatusDAO();
    req_094_Util.getWorkerStatus(WorkerStatus.ALLOCATED_FOR_BROKER);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertEquals(workerStatus.getMasterPeerAddress(), peerID.getServiceID().toString());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertTrue(workerStatus.isAllocated());
    TestCase.assertTrue(workerStatus.isPreparingAllocationState());

    req_087_Util.pausePreparingAllocatedForBrokerWorker(component, wmc, prepFuture);

    req_094_Util.getWorkerStatus(WorkerStatus.OWNER);

    TestCase.assertNotNull(workerStatus.getMasterPeerAddress());
    TestCase.assertEquals(workerStatus.getMasterPeerAddress(), peerID.getServiceID().toString());
    TestCase.assertTrue(workerStatus.isLogged());
    TestCase.assertFalse(workerStatus.isAllocated());
  }