Fix tests

This commit is contained in:
Spencer Gibb
2017-08-09 10:39:16 -06:00
parent 9d5b8e6cfd
commit 1d59ab53f8
2 changed files with 6 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
import static org.springframework.cloud.gateway.handler.support.RoutePredicateFactoryUtils.traceMatch;
import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.URI_TEMPLATE_VARIABLES_ATTRIBUTE;
import static org.springframework.http.server.reactive.PathContainer.parsePath;
import static org.springframework.http.server.reactive.PathContainer.parseUrlPath;
/**
* @author Spencer Gibb
@@ -57,7 +57,7 @@ public class PathRoutePredicateFactory implements RoutePredicateFactory {
}
return exchange -> {
PathContainer path = parsePath(exchange.getRequest().getURI().getPath());
PathContainer path = parseUrlPath(exchange.getRequest().getURI().getPath());
boolean match = pattern.matches(path);
traceMatch("Pattern", pattern.getPatternString(), path, match);

View File

@@ -69,8 +69,10 @@ public class HystrixWebFilterFactoryTests extends BaseWebClientTests {
.exchange();
StepVerifier.create(result)
.expectError() //TODO: can we get more specific as to the error?
.verify();
.consumeNextWith(
response -> assertStatus(response, HttpStatus.INTERNAL_SERVER_ERROR))
.expectComplete()
.verify(DURATION);
}
@EnableAutoConfiguration