Polish observability changes

Closes gh-29235
This commit is contained in:
Johnny Lim
2022-10-01 01:54:21 +09:00
committed by Brian Clozel
parent afac8dd8af
commit 380795e5b8
23 changed files with 106 additions and 87 deletions

View File

@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class DefaultClientObservationConventionTests {
private DefaultClientObservationConvention observationConvention = new DefaultClientObservationConvention();
private final DefaultClientObservationConvention observationConvention = new DefaultClientObservationConvention();
@Test
void shouldHaveName() {

View File

@@ -39,19 +39,19 @@ import static org.mockito.Mockito.verifyNoMoreInteractions;
* Tests for the {@link WebClient} {@link io.micrometer.observation.Observation observations}.
* @author Brian Clozel
*/
public class DefaultClientObservationTests {
class WebClientObservationTests {
private final TestObservationRegistry observationRegistry = TestObservationRegistry.create();
private ExchangeFunction exchangeFunction = mock(ExchangeFunction.class);
private final ExchangeFunction exchangeFunction = mock(ExchangeFunction.class);
private ArgumentCaptor<ClientRequest> request = ArgumentCaptor.forClass(ClientRequest.class);
private final ArgumentCaptor<ClientRequest> request = ArgumentCaptor.forClass(ClientRequest.class);
private WebClient.Builder builder;
@BeforeEach
public void setup() {
void setup() {
ClientResponse mockResponse = mock(ClientResponse.class);
when(mockResponse.statusCode()).thenReturn(HttpStatus.OK);
when(mockResponse.bodyToMono(Void.class)).thenReturn(Mono.empty());