spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Wrote WebClientHttpRoutingFilterTests. Relates to GH-73
I ran a coverage tool and noticed that one of the key GlobalFilers, WebClientHttpRoutingFilter, has a coverage of zero (at least, excluding integration tests). I bumped it up to 100%
Also wrote a missing Javadoc
Important note. I want you to delay the merge until we figure out how to assert on ClientResponse's body. The last test, filter_ifNotRouted_ifSchemeHttps_receivedResponseStoredAsAttribute(), was supposed to have this assertion as well
StepVerifier.create(storedClientResponse.bodyToMono(String.class))
.expectNext(responseBody)
.verifyComplete();
However, the body mono completes immediately so the assertion fails. I tried to pinpoint it on my own for a while, but then remembered that I no longer work on some pet project of mine and can continue solving that puzzle together with the Spring Cloud community. Maybe, it's not a puzzle at all
Yeah, there's a reason it's not tested. I'm likely going to deprecate it for removal.
Do you mean deprecating WebClientHttpRoutingFilter or ClientResponse?
WebClientHttpRoutingFilter
Well, but shouldn't it be covered while it's still part of the framework?