Search in sources :

Example 1 with ClearWanQueuesRequest

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

the class ClearWanQueuesTest method testClearWanQueue.

@Test
public void testClearWanQueue() throws Exception {
    ClearWanQueuesRequest clearWanQueuesRequest = new ClearWanQueuesRequest("schema", "publisher");
    JsonObject jsonObject = new JsonObject();
    clearWanQueuesRequest.writeResponse(managementCenterService, jsonObject);
    JsonObject result = (JsonObject) jsonObject.get("result");
    assertNotEquals(ChangeWanStateRequest.SUCCESS, clearWanQueuesRequest.readResponse(result));
}
Also used : ClearWanQueuesRequest(com.hazelcast.internal.management.request.ClearWanQueuesRequest) JsonObject(com.eclipsesource.json.JsonObject) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 2 with ClearWanQueuesRequest

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

the class ClearWanQueuesTest method testSerialization.

@Test
public void testSerialization() {
    ClearWanQueuesRequest clearWanQueuesRequest1 = new ClearWanQueuesRequest("schema", "publisher");
    JsonObject jsonObject = clearWanQueuesRequest1.toJson();
    ClearWanQueuesRequest clearWanQueuesRequest2 = new ClearWanQueuesRequest();
    clearWanQueuesRequest2.fromJson(jsonObject);
    assertEquals(clearWanQueuesRequest1.getPublisherName(), clearWanQueuesRequest2.getPublisherName());
    assertEquals(clearWanQueuesRequest1.getSchemeName(), clearWanQueuesRequest2.getSchemeName());
}
Also used : ClearWanQueuesRequest(com.hazelcast.internal.management.request.ClearWanQueuesRequest) 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)2 ClearWanQueuesRequest (com.hazelcast.internal.management.request.ClearWanQueuesRequest)2 ParallelTest (com.hazelcast.test.annotation.ParallelTest)2 QuickTest (com.hazelcast.test.annotation.QuickTest)2 Test (org.junit.Test)2