Search in sources :

Example 1 with DummyTest

use of com.hazelcast.simulator.tests.DummyTest in project hazelcast-simulator by hazelcast.

the class PerformanceMonitorTest method test_whenTestRunning_thenSendPerformanceStats.

@Test
public void test_whenTestRunning_thenSendPerformanceStats() {
    performanceMonitor.start();
    sleepMillis(300);
    DummyTest test = new DummyTest();
    TestContext testContext = addTest(test);
    Thread runTestThread = new RunTestThread();
    runTestThread.start();
    assertTrueEventually(new AssertTask() {

        @Override
        public void run() throws Exception {
            assertPerfStatsSend();
        }
    });
    testContext.stop();
    joinThread(runTestThread);
    performanceMonitor.close();
}
Also used : DummyTest(com.hazelcast.simulator.tests.DummyTest) TestContext(com.hazelcast.simulator.test.TestContext) AssertTask(com.hazelcast.simulator.utils.AssertTask) CommonUtils.joinThread(com.hazelcast.simulator.utils.CommonUtils.joinThread) SuccessTest(com.hazelcast.simulator.tests.SuccessTest) Test(org.junit.Test) DummyTest(com.hazelcast.simulator.tests.DummyTest)

Example 2 with DummyTest

use of com.hazelcast.simulator.tests.DummyTest in project hazelcast-simulator by hazelcast.

the class PerformanceMonitorTest method test_whenTestWithProbeWhichIsNotRunning_thenDoNothing.

@Test
public void test_whenTestWithProbeWhichIsNotRunning_thenDoNothing() {
    addTest(new DummyTest());
    performanceMonitor.start();
    verifyNoMoreInteractions(server);
}
Also used : DummyTest(com.hazelcast.simulator.tests.DummyTest) SuccessTest(com.hazelcast.simulator.tests.SuccessTest) Test(org.junit.Test) DummyTest(com.hazelcast.simulator.tests.DummyTest)

Aggregations

DummyTest (com.hazelcast.simulator.tests.DummyTest)2 SuccessTest (com.hazelcast.simulator.tests.SuccessTest)2 Test (org.junit.Test)2 TestContext (com.hazelcast.simulator.test.TestContext)1 AssertTask (com.hazelcast.simulator.utils.AssertTask)1 CommonUtils.joinThread (com.hazelcast.simulator.utils.CommonUtils.joinThread)1