use of com.hazelcast.core.PartitionService in project hazelcast by hazelcast.
the class PartitionServiceProxyTest method testRandomPartitionKeyNotNull.
@Test
public void testRandomPartitionKeyNotNull() {
PartitionService p = client.getPartitionService();
String key = p.randomPartitionKey();
assertNotNull(key);
}
use of com.hazelcast.core.PartitionService in project hazelcast by hazelcast.
the class PartitionServiceProxyTest method testRemoveMigrationListener.
@Test(expected = UnsupportedOperationException.class)
public void testRemoveMigrationListener() throws Exception {
PartitionService p = client.getPartitionService();
p.removeMigrationListener("");
}
use of com.hazelcast.core.PartitionService in project hazelcast by hazelcast.
the class PartitionServiceProxyTest method testGetPartitions.
@Test
public void testGetPartitions() {
String key = "Key";
PartitionService clientPartitionService = client.getPartitionService();
Set<Partition> clientPartitions = clientPartitionService.getPartitions();
PartitionService serverPartitionService = server.getPartitionService();
Set<Partition> serverPartitions = serverPartitionService.getPartitions();
assertEquals(clientPartitions.size(), serverPartitions.size());
}
use of com.hazelcast.core.PartitionService in project hazelcast by hazelcast.
the class PartitionServiceProxyTest method testGetPartition.
@Test
public void testGetPartition() {
String key = "Key";
PartitionService clientPartitionService = client.getPartitionService();
Partition clientPartition = clientPartitionService.getPartition(key);
PartitionService serverPartitionService = server.getPartitionService();
Partition serverPartition = serverPartitionService.getPartition(key);
assertEquals(clientPartition.getPartitionId(), serverPartition.getPartitionId());
}
use of com.hazelcast.core.PartitionService in project hazelcast by hazelcast.
the class PartitionServiceProxyTest method testAddMigrationListener.
@Test(expected = UnsupportedOperationException.class)
public void testAddMigrationListener() throws Exception {
PartitionService p = client.getPartitionService();
p.addMigrationListener(new DumMigrationListener());
}
Aggregations