use of com.hazelcast.simulator.coordinator.operations.RcWorkerScriptOperation in project hazelcast-simulator by hazelcast.
the class CoordinatorRemoteImplTest method test_RcWorkerScriptOperation.
@Test
public void test_RcWorkerScriptOperation() throws Exception {
RcWorkerScriptOperation op = new RcWorkerScriptOperation("bla");
String expected = "ok";
when(coordinator.workerScript(op)).thenReturn(expected);
String result = remote.execute(op);
assertSame(expected, result);
}
use of com.hazelcast.simulator.coordinator.operations.RcWorkerScriptOperation 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", ""));
}
Aggregations