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);
}
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));
}
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);
}
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", ""));
}
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));
}
Aggregations