parent
abdad1cabe
commit
548b0ea91f
|
|
@ -43,7 +43,7 @@ import org.junit.jupiter.api.Test;
|
|||
import org.springframework.boot.actuate.metrics.AutoTimer;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
|
@ -145,7 +145,7 @@ class GraphQlMetricsInstrumentationTests {
|
|||
InstrumentationFieldFetchParameters fieldFetchParameters = mockFieldFetchParameters(false);
|
||||
DataFetcher<?> instrumented = this.instrumentation.instrumentDataFetcher(dataFetcher, fieldFetchParameters);
|
||||
DataFetchingEnvironment environment = DataFetchingEnvironmentImpl.newDataFetchingEnvironment().build();
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> instrumented.get(environment));
|
||||
assertThatIllegalStateException().isThrownBy(() -> instrumented.get(environment));
|
||||
Timer timer = this.registry.find("graphql.datafetcher").timer();
|
||||
assertThat(timer).isNotNull();
|
||||
assertThat(timer.count()).isEqualTo(1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue