Search in sources :

Example 1 with ShutdownClusterRequest

use of com.hazelcast.internal.management.request.ShutdownClusterRequest in project hazelcast by hazelcast.

the class ShutdownClusterRequestTest method testShutdownCluster.

@Test
public void testShutdownCluster() throws Exception {
    ShutdownClusterRequest request = new ShutdownClusterRequest();
    cluster.getClusterState();
    JsonObject jsonObject = new JsonObject();
    request.writeResponse(managementCenterService, jsonObject);
    JsonObject result = (JsonObject) jsonObject.get("result");
    assertEquals("SUCCESS", request.readResponse(result));
    assertTrueEventually(new AssertTask() {

        @Override
        public void run() throws Exception {
            assertFalse(lifecycleService.isRunning());
        }
    });
}
Also used : JsonObject(com.eclipsesource.json.JsonObject) AssertTask(com.hazelcast.test.AssertTask) ShutdownClusterRequest(com.hazelcast.internal.management.request.ShutdownClusterRequest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

JsonObject (com.eclipsesource.json.JsonObject)1 ShutdownClusterRequest (com.hazelcast.internal.management.request.ShutdownClusterRequest)1 AssertTask (com.hazelcast.test.AssertTask)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1