Merge branch '6.1.x'
This commit is contained in:
commit
c1bd9243ee
|
|
@ -471,7 +471,7 @@ final class DefaultWebClient implements WebClient {
|
||||||
final AtomicBoolean responseReceived = new AtomicBoolean();
|
final AtomicBoolean responseReceived = new AtomicBoolean();
|
||||||
return responseMono
|
return responseMono
|
||||||
.doOnNext(response -> responseReceived.set(true))
|
.doOnNext(response -> responseReceived.set(true))
|
||||||
.doOnError(observationContext::setError)
|
.doOnError(observation::error)
|
||||||
.doFinally(signalType -> {
|
.doFinally(signalType -> {
|
||||||
if (signalType == SignalType.CANCEL && !responseReceived.get()) {
|
if (signalType == SignalType.CANCEL && !responseReceived.get()) {
|
||||||
observationContext.setAborted(true);
|
observationContext.setAborted(true);
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,8 @@ class WebClientObservationTests {
|
||||||
StepVerifier.create(client.get().uri("/path").retrieve().bodyToMono(Void.class))
|
StepVerifier.create(client.get().uri("/path").retrieve().bodyToMono(Void.class))
|
||||||
.expectError(IllegalStateException.class)
|
.expectError(IllegalStateException.class)
|
||||||
.verify(Duration.ofSeconds(5));
|
.verify(Duration.ofSeconds(5));
|
||||||
assertThatHttpObservation().hasLowCardinalityKeyValue("exception", "IllegalStateException")
|
assertThatHttpObservation().hasError()
|
||||||
|
.hasLowCardinalityKeyValue("exception", "IllegalStateException")
|
||||||
.hasLowCardinalityKeyValue("status", "CLIENT_ERROR");
|
.hasLowCardinalityKeyValue("status", "CLIENT_ERROR");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -172,7 +173,7 @@ class WebClientObservationTests {
|
||||||
StepVerifier.create(responseMono)
|
StepVerifier.create(responseMono)
|
||||||
.expectError(IllegalStateException.class)
|
.expectError(IllegalStateException.class)
|
||||||
.verify(Duration.ofSeconds(5));
|
.verify(Duration.ofSeconds(5));
|
||||||
assertThatHttpObservation()
|
assertThatHttpObservation().hasError()
|
||||||
.hasLowCardinalityKeyValue("exception", "IllegalStateException")
|
.hasLowCardinalityKeyValue("exception", "IllegalStateException")
|
||||||
.hasLowCardinalityKeyValue("status", "200");
|
.hasLowCardinalityKeyValue("status", "200");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue