Formatting

This commit is contained in:
Spencer Gibb
2019-06-13 16:16:27 -04:00
parent 71c45bdab8
commit 563cfb7479
3 changed files with 9 additions and 7 deletions

View File

@@ -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,

View File

@@ -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");

View File

@@ -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