Merge branch '6.1.x'
This commit is contained in:
commit
c72e31bcf5
|
|
@ -247,19 +247,16 @@ final class DefaultRestClient implements RestClient {
|
|||
ResolvableType.forType(bodyType) + "] and content type [" + contentType + "]", cause);
|
||||
if (observation != null) {
|
||||
observation.error(restClientException);
|
||||
observation.stop();
|
||||
}
|
||||
throw restClientException;
|
||||
}
|
||||
catch (RestClientException restClientException) {
|
||||
if (observation != null) {
|
||||
observation.error(restClientException);
|
||||
}
|
||||
throw restClientException;
|
||||
}
|
||||
finally {
|
||||
if (observation != null) {
|
||||
observation.stop();
|
||||
}
|
||||
throw restClientException;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ class RestClientObservationTests {
|
|||
|
||||
@BeforeEach
|
||||
void setupEach() {
|
||||
|
||||
this.client = RestClient.builder()
|
||||
.messageConverters(converters -> converters.add(0, this.converter))
|
||||
.requestFactory(this.requestFactory)
|
||||
|
|
@ -267,6 +266,7 @@ class RestClientObservationTests {
|
|||
|
||||
|
||||
private TestObservationRegistryAssert.TestObservationRegistryAssertReturningObservationContextAssert assertThatHttpObservation() {
|
||||
TestObservationRegistryAssert.assertThat(this.observationRegistry).hasNumberOfObservationsWithNameEqualTo("http.client.requests",1);
|
||||
return TestObservationRegistryAssert.assertThat(this.observationRegistry)
|
||||
.hasObservationWithNameEqualTo("http.client.requests").that();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue