Search in sources :

Example 1 with RcTestStopOperation

use of com.hazelcast.simulator.coordinator.operations.RcTestStopOperation in project hazelcast-simulator by hazelcast.

the class CoordinatorRemoteImplTest method test_RcTestStopOperation.

@Test
public void test_RcTestStopOperation() throws Exception {
    RcTestStopOperation op = new RcTestStopOperation("testId");
    String expected = "ready";
    when(coordinator.testStop(op)).thenReturn(expected);
    String result = remote.execute(op);
    assertSame(expected, result);
}
Also used : RcTestStopOperation(com.hazelcast.simulator.coordinator.operations.RcTestStopOperation) Test(org.junit.Test)

Example 2 with RcTestStopOperation

use of com.hazelcast.simulator.coordinator.operations.RcTestStopOperation in project hazelcast-simulator by hazelcast.

the class CoordinatorTest method testStopTest.

@Test
public void testStopTest() throws Exception {
    coordinator.workerStart(new RcWorkerStartOperation().setHzConfig(hzConfig));
    TestSuite suite = newBasicTestSuite().setDurationSeconds(0);
    String testId = coordinator.testRun(new RcTestRunOperation(suite).setAsync(true));
    assertTestStateEventually(testId, "run");
    coordinator.testStop(new RcTestStopOperation(testId));
    assertTestCompletesEventually(testId);
}
Also used : RcTestStopOperation(com.hazelcast.simulator.coordinator.operations.RcTestStopOperation) RcWorkerStartOperation(com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation) RcTestRunOperation(com.hazelcast.simulator.coordinator.operations.RcTestRunOperation) SuccessTest(com.hazelcast.simulator.tests.SuccessTest) Test(org.junit.Test)

Aggregations

RcTestStopOperation (com.hazelcast.simulator.coordinator.operations.RcTestStopOperation)2 Test (org.junit.Test)2 RcTestRunOperation (com.hazelcast.simulator.coordinator.operations.RcTestRunOperation)1 RcWorkerStartOperation (com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation)1 SuccessTest (com.hazelcast.simulator.tests.SuccessTest)1