Search in sources :

Example 1 with RcTestRunOperation

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

the class CoordinatorRemoteImplTest method test_RcTestRunOperation.

@Test
public void test_RcTestRunOperation() throws Exception {
    TestSuite suite = mock(TestSuite.class);
    RcTestRunOperation op = new RcTestRunOperation(suite);
    String expected = "test";
    when(coordinator.testRun(op)).thenReturn(expected);
    String result = remote.execute(op);
    assertSame(expected, result);
}
Also used : RcTestRunOperation(com.hazelcast.simulator.coordinator.operations.RcTestRunOperation) Test(org.junit.Test)

Example 2 with RcTestRunOperation

use of com.hazelcast.simulator.coordinator.operations.RcTestRunOperation 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)

Example 3 with RcTestRunOperation

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

the class Runner method run.

public void run() throws Exception {
    prepareClassPathForUploading();
    Coordinator coordinator = newCoordinator();
    try {
        startMembers(coordinator);
        startClients(coordinator);
        TestSuite suite = newTestSuite();
        coordinator.testRun(new RcTestRunOperation(suite));
    } finally {
        coordinator.close();
    }
}
Also used : TestSuite(com.hazelcast.simulator.coordinator.TestSuite) Coordinator(com.hazelcast.simulator.coordinator.Coordinator) RcTestRunOperation(com.hazelcast.simulator.coordinator.operations.RcTestRunOperation)

Aggregations

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