use of com.netflix.discovery.shared.transport.TransportException in project eureka by Netflix.
the class RetryableEurekaHttpClientTest method simulateTransportError.
private void simulateTransportError(int delegateFrom, int count) {
for (int i = 0; i < count; i++) {
int delegateId = delegateFrom + i;
when(clientFactory.newClient(Matchers.<EurekaEndpoint>anyVararg())).thenReturn(clusterDelegates.get(delegateId));
when(requestExecutor.execute(clusterDelegates.get(delegateId))).thenThrow(new TransportException("simulated network error"));
}
}
Aggregations