Search in sources :

Example 1 with ResponseTimeoutException

use of com.hotels.styx.api.exceptions.ResponseTimeoutException in project styx by ExpediaGroup.

the class HttpErrorStatusMetricsTest method backendFaultArgs.

private static Stream<Arguments> backendFaultArgs() {
    Id appId = Id.id("fakeApp");
    Id originId = Id.id("fakeApp1");
    Origin origin = Origin.newOriginBuilder("fakeHost", 9999).applicationId(appId).id(originId.toString()).build();
    Exception cause = new Exception();
    return Stream.of(Arguments.of(new NoAvailableHostsException(appId), "noHostsLiveForApplication"), Arguments.of(new OriginUnreachableException(origin, cause), "cannotConnect"), Arguments.of(new BadHttpResponseException(origin, cause), "badHttpResponse"), Arguments.of(new MaxPendingConnectionTimeoutException(origin, 1), "connectionsHeldTooLong"), Arguments.of(new MaxPendingConnectionsExceededException(origin, 1, 1), "tooManyConnections"), Arguments.of(new ResponseTimeoutException(origin, "test", 1, 1, 1, 1), "responseTooSlow"));
}
Also used : Origin(com.hotels.styx.api.extension.Origin) ResponseTimeoutException(com.hotels.styx.api.exceptions.ResponseTimeoutException) NoAvailableHostsException(com.hotels.styx.api.exceptions.NoAvailableHostsException) OriginUnreachableException(com.hotels.styx.api.exceptions.OriginUnreachableException) MaxPendingConnectionTimeoutException(com.hotels.styx.client.connectionpool.MaxPendingConnectionTimeoutException) MaxPendingConnectionsExceededException(com.hotels.styx.client.connectionpool.MaxPendingConnectionsExceededException) BadHttpResponseException(com.hotels.styx.client.BadHttpResponseException) Id(com.hotels.styx.api.Id) MaxPendingConnectionTimeoutException(com.hotels.styx.client.connectionpool.MaxPendingConnectionTimeoutException) NoAvailableHostsException(com.hotels.styx.api.exceptions.NoAvailableHostsException) PluginException(com.hotels.styx.api.plugins.spi.PluginException) OriginUnreachableException(com.hotels.styx.api.exceptions.OriginUnreachableException) ResponseTimeoutException(com.hotels.styx.api.exceptions.ResponseTimeoutException) MaxPendingConnectionsExceededException(com.hotels.styx.client.connectionpool.MaxPendingConnectionsExceededException) BadHttpResponseException(com.hotels.styx.client.BadHttpResponseException)

Aggregations

Id (com.hotels.styx.api.Id)1 NoAvailableHostsException (com.hotels.styx.api.exceptions.NoAvailableHostsException)1 OriginUnreachableException (com.hotels.styx.api.exceptions.OriginUnreachableException)1 ResponseTimeoutException (com.hotels.styx.api.exceptions.ResponseTimeoutException)1 Origin (com.hotels.styx.api.extension.Origin)1 PluginException (com.hotels.styx.api.plugins.spi.PluginException)1 BadHttpResponseException (com.hotels.styx.client.BadHttpResponseException)1 MaxPendingConnectionTimeoutException (com.hotels.styx.client.connectionpool.MaxPendingConnectionTimeoutException)1 MaxPendingConnectionsExceededException (com.hotels.styx.client.connectionpool.MaxPendingConnectionsExceededException)1