use of net.dempsy.router.RoutingStrategy.ContainerAddress in project Dempsy by Dempsy.
the class TestManagedRoutingStrategy method testInboundSimpleHappyPathRegister.
@Test
public void testInboundSimpleHappyPathRegister() throws Exception {
final int numShardsToExpect = Integer.parseInt(Utils.DEFAULT_TOTAL_SHARDS);
final Manager<RoutingStrategy.Inbound> manager = new Manager<>(RoutingStrategy.Inbound.class);
try (final RoutingStrategy.Inbound ib = manager.getAssociatedInstance(ManagedInbound.class.getPackage().getName())) {
final ClusterId clusterId = new ClusterId("test", "test");
final Utils<ContainerAddress> msutils = new Utils<>(infra, clusterId.clusterName, new ContainerAddress(new DummyNodeAddress("testInboundSimpleHappyPathRegister"), 0));
assertNotNull(ib);
assertTrue(ManagedInbound.class.isAssignableFrom(ib.getClass()));
ib.setContainerDetails(clusterId, new ContainerAddress(new DummyNodeAddress("testInboundSimpleHappyPathRegister"), 0), (l, m) -> {
});
ib.start(infra);
assertTrue(waitForShards(session, msutils, numShardsToExpect));
}
}
Aggregations