File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
testing-common/integration-tests/src/test/java/indy Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 88import static org .assertj .core .api .Assertions .assertThat ;
99import static org .assertj .core .api .Assertions .assertThatThrownBy ;
1010
11+ import io .opentelemetry .instrumentation .testing .junit .AgentInstrumentationExtension ;
12+ import io .opentelemetry .instrumentation .testing .junit .InstrumentationExtension ;
13+ import io .opentelemetry .javaagent .testing .common .TestAgentListenerAccess ;
1114import org .junit .jupiter .api .AfterEach ;
1215import org .junit .jupiter .api .Test ;
16+ import org .junit .jupiter .api .extension .RegisterExtension ;
1317
1418@ SuppressWarnings ({"unused" , "MethodCanBeStatic" })
1519public class IndyInstrumentationTest {
1620
21+ @ RegisterExtension
22+ static final InstrumentationExtension testing = AgentInstrumentationExtension .create ();
23+
1724 private String privateField ;
1825
1926 // The following methods are instrumented by the IndyInstrumentationTestModule
@@ -92,6 +99,7 @@ void testAssignToReturnViaArray() {
9299 @ Test
93100 void testSuppressException () {
94101 assertThat (noExceptionPlease ("foo" )).isEqualTo ("foo_no_exception" );
102+ assertThat (TestAgentListenerAccess .getAndResetAdviceFailureCount ()).isEqualTo (2 );
95103 }
96104
97105 @ Test
You can’t perform that action at this time.
0 commit comments