Search in sources :

Example 1 with RcWorkerStartOperation

use of com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation 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 2 with RcWorkerStartOperation

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

the class Runner method startClients.

private void startClients(Coordinator coordinator) throws Exception {
    if (options.clientCount <= 0) {
        return;
    }
    RcWorkerStartOperation op = new RcWorkerStartOperation().setVmOptions(options.clientArgs).setCount(options.clientCount).setWorkerType("javaclient");
    System.out.println("Started members: " + coordinator.workerStart(op));
}
Also used : RcWorkerStartOperation(com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation)

Example 3 with RcWorkerStartOperation

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

the class CoordinatorRemoteImplTest method test_RcWorkerStartOperation.

@Test
public void test_RcWorkerStartOperation() throws Exception {
    RcWorkerStartOperation op = new RcWorkerStartOperation();
    String expected = "ok";
    when(coordinator.workerStart(op)).thenReturn(expected);
    String result = remote.execute(op);
    assertSame(expected, result);
}
Also used : RcWorkerStartOperation(com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation) Test(org.junit.Test)

Example 4 with RcWorkerStartOperation

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

the class CoordinatorTest method workerScript.

@Test
public void workerScript() throws Exception {
    coordinator.workerStart(new RcWorkerStartOperation().setHzConfig(hzConfig));
    String result = coordinator.workerScript(new RcWorkerScriptOperation("js:'a'"));
    assertEquals(format("A1_W%s=a", (initialWorkerIndex + 1)), result.replace("\n", ""));
}
Also used : RcWorkerScriptOperation(com.hazelcast.simulator.coordinator.operations.RcWorkerScriptOperation) RcWorkerStartOperation(com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation) SuccessTest(com.hazelcast.simulator.tests.SuccessTest) Test(org.junit.Test)

Example 5 with RcWorkerStartOperation

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

the class Runner method startMembers.

private void startMembers(Coordinator coordinator) throws Exception {
    String configString = createConfig();
    RcWorkerStartOperation op = new RcWorkerStartOperation().setVmOptions(options.memberArgs).setHzConfig(configString).setCount(options.memberCount);
    System.out.println("Started members: " + coordinator.workerStart(op));
}
Also used : RcWorkerStartOperation(com.hazelcast.simulator.coordinator.operations.RcWorkerStartOperation)

Aggregations

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