Search in sources :

Example 6 with ExecuteScriptOperation

use of com.hazelcast.simulator.worker.operations.ExecuteScriptOperation in project hazelcast-simulator by hazelcast.

the class ScriptExecutorTest method javascript.

@Test
public void javascript() {
    ExecuteScriptOperation scriptOperation = new ExecuteScriptOperation("js:java.lang.System.out.println();", false);
    StubPromise promise = new StubPromise();
    scriptExecutor.execute(scriptOperation, promise);
    promise.assertCompletesEventually();
    assertTrue(promise.getAnswer() instanceof String);
}
Also used : ExecuteScriptOperation(com.hazelcast.simulator.worker.operations.ExecuteScriptOperation) StubPromise(com.hazelcast.simulator.protocol.StubPromise) Test(org.junit.Test)

Aggregations

ExecuteScriptOperation (com.hazelcast.simulator.worker.operations.ExecuteScriptOperation)6 Test (org.junit.Test)4 StubPromise (com.hazelcast.simulator.protocol.StubPromise)3 WorkerData (com.hazelcast.simulator.coordinator.registry.WorkerData)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Future (java.util.concurrent.Future)1