use of com.hazelcast.simulator.protocol.Server in project hazelcast-simulator by hazelcast.
the class WorkerProcessManager_LaunchTest method before.
@Before
public void before() {
File simulatorHome = setupFakeEnvironment();
workersHome = new File(simulatorHome, "workers");
server = mock(Server.class);
workerProcessManager = new WorkerProcessManager(server, SimulatorAddress.fromString("A1"), "127.0.0.1");
}
use of com.hazelcast.simulator.protocol.Server in project hazelcast-simulator by hazelcast.
the class WorkerProcessFailureMonitorTest method before.
@Before
public void before() {
File simulatorHome = setupFakeEnvironment();
workersHome = new File(simulatorHome, "workers");
failureHandler = mock(WorkerProcessFailureHandler.class);
Server server = mock(Server.class);
workerProcessManager = new WorkerProcessManager(server, SimulatorAddress.fromString("A1"), "127.0.0.1");
workerProcessFailureMonitor = new WorkerProcessFailureMonitor(failureHandler, workerProcessManager, DEFAULT_LAST_SEEN_TIMEOUT_SECONDS, DEFAULT_CHECK_INTERVAL);
workerProcessFailureMonitor.start();
}
use of com.hazelcast.simulator.protocol.Server in project hazelcast-simulator by hazelcast.
the class WorkerProcessManagerTest method before.
@Before
public void before() {
workerAddress1 = workerAddress(1, 1);
workerAddress2 = workerAddress(1, 2);
workerProcess1 = new WorkerProcess(workerAddress1, workerAddress1.toString(), null);
workerProcess1.setProcess(mock(Process.class));
workerProcess2 = new WorkerProcess(workerAddress2, workerAddress2.toString(), null);
workerProcess2.setProcess(mock(Process.class));
Server server = mock(Server.class);
workerProcessManager = new WorkerProcessManager(server, workerAddress1.getParent(), "127.0.0.1");
workerProcessManager.add(workerAddress1, workerProcess1);
workerProcessManager.add(workerAddress2, workerProcess2);
}
Aggregations