use of org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactory in project infinispan by infinispan.
the class ConsistentHashFactoryTest method testNoChDefined.
public void testNoChDefined() {
ConfigurationBuilder builder = HotRodClientTestingUtil.newRemoteConfigurationBuilder();
ConsistentHashFactory chf = new ConsistentHashFactory();
chf.init(builder.build());
ConsistentHash hash = chf.newConsistentHash(2);
assertNotNull(hash);
assertEquals(hash.getClass(), ConsistentHashV2.class);
}
use of org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashFactory in project infinispan by infinispan.
the class ConsistentHashFactoryTest method testPropertyCorrectlyRead.
public void testPropertyCorrectlyRead() {
ConfigurationBuilder builder = HotRodClientTestingUtil.newRemoteConfigurationBuilder();
builder.consistentHashImpl(2, SomeCustomConsistentHashV2.class);
ConsistentHashFactory chf = new ConsistentHashFactory();
chf.init(builder.build());
ConsistentHash hash = chf.newConsistentHash(2);
assertNotNull(hash);
assertEquals(hash.getClass(), SomeCustomConsistentHashV2.class);
}
Aggregations