use of org.apache.cxf.clustering.AbstractStaticFailoverStrategy in project cxf by apache.
the class FailoverAddressOverrideTest method verifyStrategy.
protected void verifyStrategy(Object proxy, Class<?> clz, int count) {
ConduitSelector conduitSelector = ClientProxy.getClient(proxy).getConduitSelector();
if (conduitSelector instanceof FailoverTargetSelector) {
AbstractStaticFailoverStrategy strategy = (AbstractStaticFailoverStrategy) ((FailoverTargetSelector) conduitSelector).getStrategy();
assertTrue("unexpected strategy", clz.isInstance(strategy));
List<String> alternates = strategy.getAlternateAddresses(null);
assertNotNull("expected alternate addresses", alternates);
assertEquals("unexpected alternate addresses", count, alternates.size());
} else {
fail("unexpected conduit selector: " + conduitSelector);
}
}
Aggregations