use of com.hazelcast.partition.MigrationState in project hazelcast by hazelcast.
the class MigrationListenerAdapterTest method test_migrationFailed.
@Test
public void test_migrationFailed() {
MigrationState migrationSchedule = new MigrationStateImpl();
ReplicaMigrationEvent event = new ReplicaMigrationEventImpl(migrationSchedule, 0, 0, null, null, false, 0L);
adapter.onEvent(event);
verify(listener, never()).migrationStarted(any(MigrationState.class));
verify(listener, never()).migrationFinished(any(MigrationState.class));
verify(listener, never()).replicaMigrationCompleted(any(ReplicaMigrationEvent.class));
verify(listener).replicaMigrationFailed(event);
}
use of com.hazelcast.partition.MigrationState in project hazelcast by hazelcast.
the class MigrationListenerAdapterTest method test_migrationProcessCompleted.
@Test
public void test_migrationProcessCompleted() {
MigrationState migrationSchedule = new MigrationStateImpl();
ReplicaMigrationEvent event = new ReplicaMigrationEventImpl(migrationSchedule, MIGRATION_FINISHED_PARTITION_ID, 0, null, null, true, 0L);
adapter.onEvent(event);
verify(listener, never()).migrationStarted(any(MigrationState.class));
verify(listener).migrationFinished(migrationSchedule);
verify(listener, never()).replicaMigrationCompleted(any(ReplicaMigrationEvent.class));
verify(listener, never()).replicaMigrationFailed(any(ReplicaMigrationEvent.class));
}
use of com.hazelcast.partition.MigrationState in project hazelcast by hazelcast.
the class MigrationListenerAdapterTest method test_migrationCompleted.
@Test
public void test_migrationCompleted() {
MigrationState migrationSchedule = new MigrationStateImpl();
ReplicaMigrationEvent event = new ReplicaMigrationEventImpl(migrationSchedule, 0, 0, null, null, true, 0L);
adapter.onEvent(event);
verify(listener, never()).migrationStarted(any(MigrationState.class));
verify(listener, never()).migrationFinished(any(MigrationState.class));
verify(listener, never()).replicaMigrationFailed(any(ReplicaMigrationEvent.class));
verify(listener).replicaMigrationCompleted(event);
}
use of com.hazelcast.partition.MigrationState in project hazelcast by hazelcast.
the class MigrationListenerAdapterTest method test_migrationProcessStarted.
@Test
public void test_migrationProcessStarted() {
MigrationState migrationSchedule = new MigrationStateImpl();
ReplicaMigrationEvent event = new ReplicaMigrationEventImpl(migrationSchedule, MIGRATION_STARTED_PARTITION_ID, 0, null, null, true, 0L);
adapter.onEvent(event);
verify(listener).migrationStarted(migrationSchedule);
verify(listener, never()).migrationFinished(any(MigrationStateImpl.class));
verify(listener, never()).replicaMigrationCompleted(any(ReplicaMigrationEvent.class));
verify(listener, never()).replicaMigrationFailed(any(ReplicaMigrationEvent.class));
}
Aggregations