use of com.hazelcast.internal.partition.MigrationInfo in project hazelcast by hazelcast.
the class MigrationCommitServiceTest method testPartitionBackupCopyCommit.
@Test
public void testPartitionBackupCopyCommit() throws Exception {
Address destination = clearReplicaIndex(PARTITION_ID_TO_MIGRATE, NODE_COUNT - 1);
MigrationInfo migration = createCopyMigration(PARTITION_ID_TO_MIGRATE, NODE_COUNT - 1, destination);
migrateWithSuccess(migration);
assertMigrationDestinationCommit(migration);
assertPartitionDataAfterMigrations();
}
use of com.hazelcast.internal.partition.MigrationInfo in project hazelcast by hazelcast.
the class MigrationCommitServiceTest method testPartitionBackupShiftUpCommitWithNonNullOwnerOfReplicaIndex.
@Test
public void testPartitionBackupShiftUpCommitWithNonNullOwnerOfReplicaIndex() throws Exception {
int oldReplicaIndex = NODE_COUNT - 1, newReplicaIndex = NODE_COUNT - 2;
MigrationInfo migration = createShiftUpMigration(PARTITION_ID_TO_MIGRATE, oldReplicaIndex, newReplicaIndex);
migrateWithSuccess(migration);
assertMigrationSourceCommit(migration);
assertMigrationDestinationCommit(migration);
assertPartitionDataAfterMigrations();
}
use of com.hazelcast.internal.partition.MigrationInfo in project hazelcast by hazelcast.
the class MigrationCommitServiceTest method testSuccessfulShiftDownMigration.
private void testSuccessfulShiftDownMigration(int partitionId, int replicaIndexToClear, int oldReplicaIndex, int newReplicaIndex) throws Exception {
Address destination = clearReplicaIndex(partitionId, replicaIndexToClear);
MigrationInfo migration = createShiftDownMigration(partitionId, oldReplicaIndex, newReplicaIndex, destination);
migrateWithSuccess(migration);
assertMigrationSourceCommit(migration);
assertMigrationDestinationCommit(migration);
assertPartitionDataAfterMigrations();
}
use of com.hazelcast.internal.partition.MigrationInfo in project hazelcast by hazelcast.
the class MigrationCommitServiceTest method testFailedMoveMigration.
private void testFailedMoveMigration(int partitionId, int replicaIndexToClear, int replicaIndexToMigrate) throws Exception {
Address destination = clearReplicaIndex(partitionId, replicaIndexToClear);
MigrationInfo migration = createMoveMigration(partitionId, replicaIndexToMigrate, destination);
migrateWithFailure(migration);
assertMigrationSourceRollback(migration);
assertMigrationDestinationRollback(migration);
assertPartitionDataAfterMigrations();
}
use of com.hazelcast.internal.partition.MigrationInfo in project hazelcast by hazelcast.
the class MigrationCommitServiceTest method testPartitionBackupShiftUpCommitWithNullOwnerOfReplicaIndex.
@Test
public void testPartitionBackupShiftUpCommitWithNullOwnerOfReplicaIndex() throws Exception {
int oldReplicaIndex = NODE_COUNT - 1, newReplicaIndex = NODE_COUNT - 2;
clearReplicaIndex(PARTITION_ID_TO_MIGRATE, newReplicaIndex);
MigrationInfo migration = createShiftUpMigration(PARTITION_ID_TO_MIGRATE, oldReplicaIndex, newReplicaIndex);
migrateWithSuccess(migration);
assertMigrationDestinationCommit(migration);
assertPartitionDataAfterMigrations();
}
Aggregations