Search in sources :

Example 6 with ClusterHotRestartStatusDTO

use of com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO in project hazelcast by hazelcast.

the class NoopHotRestartServicesTest method testNoOpInternalHotRestartService.

@Test
public void testNoOpInternalHotRestartService() {
    final NoopInternalHotRestartService service = new NoopInternalHotRestartService();
    service.notifyExcludedMember(null);
    service.handleExcludedMemberUuids(null, null);
    service.forceStartBeforeJoin();
    assertFalse(service.triggerForceStart());
    assertFalse(service.triggerPartialStart());
    assertFalse(service.isMemberExcluded(null, null));
    assertEquals(0, service.getExcludedMemberUuids().size());
    final ClusterHotRestartStatusDTO expected = new ClusterHotRestartStatusDTO();
    final ClusterHotRestartStatusDTO dto = service.getCurrentClusterHotRestartStatus();
    assertEquals(expected.getDataRecoveryPolicy(), dto.getDataRecoveryPolicy());
    assertEquals(expected.getHotRestartStatus(), dto.getHotRestartStatus());
    assertEquals(expected.getRemainingDataLoadTimeMillis(), dto.getRemainingDataLoadTimeMillis());
    assertEquals(expected.getRemainingValidationTimeMillis(), dto.getRemainingValidationTimeMillis());
}
Also used : NoopInternalHotRestartService(com.hazelcast.internal.hotrestart.NoopInternalHotRestartService) ClusterHotRestartStatusDTO(com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

ClusterHotRestartStatusDTO (com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO)6 ClientEndPointDTO (com.hazelcast.internal.management.dto.ClientEndPointDTO)4 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 CacheStatisticsImpl (com.hazelcast.cache.impl.CacheStatisticsImpl)2 Address (com.hazelcast.cluster.Address)2 ClusterState (com.hazelcast.cluster.ClusterState)2 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 EndpointQualifier (com.hazelcast.instance.EndpointQualifier)2 TimedMemberStateFactory (com.hazelcast.internal.management.TimedMemberStateFactory)2 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)2 MemberVersion (com.hazelcast.version.MemberVersion)2 Version (com.hazelcast.version.Version)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 JsonArray (com.eclipsesource.json.JsonArray)1 JsonObject (com.eclipsesource.json.JsonObject)1 JsonValue (com.eclipsesource.json.JsonValue)1 BackupTaskStatus (com.hazelcast.hotrestart.BackupTaskStatus)1 ProtocolType (com.hazelcast.instance.ProtocolType)1