mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-25 10:59:03 +00:00
Fix failing exception assertion
See gh-37964
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user