use of org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.RibbonServer in project spring-cloud-netflix by spring-cloud.
the class RibbonLoadBalancerClientTests method testExecuteException.
@Test
public void testExecuteException() {
final RibbonServer ribbonServer = getRibbonServer();
RibbonLoadBalancerClient client = getRibbonLoadBalancerClient(ribbonServer);
try {
client.execute(ribbonServer.getServiceId(), instance -> {
assertServiceInstance(ribbonServer, instance);
throw new RuntimeException();
});
fail("Should have thrown exception");
} catch (Exception ex) {
assertNotNull(ex);
}
verifyServerStats();
}
Aggregations