Search in sources :

Example 1 with GetClusterStateRequest

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

the class GetClusterStateRequestTest method testGetClusterState.

@Test
public void testGetClusterState() throws Exception {
    GetClusterStateRequest request = new GetClusterStateRequest();
    ClusterState clusterState = cluster.getClusterState();
    JsonObject jsonObject = new JsonObject();
    request.writeResponse(managementCenterService, jsonObject);
    JsonObject result = (JsonObject) jsonObject.get("result");
    assertEquals(clusterState.name(), request.readResponse(result));
}
Also used : ClusterState(com.hazelcast.cluster.ClusterState) GetClusterStateRequest(com.hazelcast.internal.management.request.GetClusterStateRequest) JsonObject(com.eclipsesource.json.JsonObject) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

JsonObject (com.eclipsesource.json.JsonObject)1 ClusterState (com.hazelcast.cluster.ClusterState)1 GetClusterStateRequest (com.hazelcast.internal.management.request.GetClusterStateRequest)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1