Formatting
This commit is contained in:
@@ -102,8 +102,9 @@ public class HystrixGatewayFilterFactory
|
||||
/**
|
||||
* Create a {@link Setter} based on incoming request attribute. <br>
|
||||
* This could be useful for example to create a Setter with {@link HystrixCommandKey}
|
||||
* being set as the target service's host:port, as obtained from {@link ServerWebExchange#getRequest()}
|
||||
* to do per service instance level circuit breaking.
|
||||
* being set as the target service's host:port, as obtained from
|
||||
* {@link ServerWebExchange#getRequest()} to do per service instance level circuit
|
||||
* breaking.
|
||||
*/
|
||||
protected Setter createCommandSetter(Config config, ServerWebExchange exchange) {
|
||||
return config.setter;
|
||||
@@ -124,8 +125,9 @@ public class HystrixGatewayFilterFactory
|
||||
}
|
||||
|
||||
return (exchange, chain) -> {
|
||||
RouteHystrixCommand command = new RouteHystrixCommand(createCommandSetter(config, exchange),
|
||||
config.fallbackUri, exchange, chain);
|
||||
RouteHystrixCommand command = new RouteHystrixCommand(
|
||||
createCommandSetter(config, exchange), config.fallbackUri, exchange,
|
||||
chain);
|
||||
|
||||
return Mono.create(s -> {
|
||||
Subscription sub = command.toObservable().subscribe(s::success, s::error,
|
||||
|
||||
@@ -66,8 +66,8 @@ public class RetryGatewayFilterFactoryIntegrationTests extends BaseWebClientTest
|
||||
|
||||
@Test
|
||||
public void retryFilterFailure() {
|
||||
testClient.mutate().responseTimeout(Duration.ofSeconds(10)).build()
|
||||
.get().uri("/retryalwaysfail?key=getjavafailure&count=4")
|
||||
testClient.mutate().responseTimeout(Duration.ofSeconds(10)).build().get()
|
||||
.uri("/retryalwaysfail?key=getjavafailure&count=4")
|
||||
.header(HttpHeaders.HOST, "www.retryjava.org").exchange().expectStatus()
|
||||
.is5xxServerError().expectBody(String.class).consumeWith(result -> {
|
||||
assertThat(result.getResponseBody()).contains("permanently broken");
|
||||
|
||||
@@ -222,7 +222,7 @@ public class ProxyExchange<T> {
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the uri for the backend call when triggered by the HTTP methods.
|
||||
* @param uri the backend uri to send the request to
|
||||
|
||||
Reference in New Issue
Block a user