Skip to content

Commit 8089ad5

Browse files
committed
Reset InstrumentationErrors before setupSpec
1 parent 8666b1a commit 8089ad5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

dd-java-agent/instrumentation-testing/src/main/groovy/datadog/trace/agent/test/InstrumentationSpecification.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ abstract class InstrumentationSpecification extends DDSpecification implements A
349349

350350
@SuppressForbidden
351351
void setupSpec() {
352+
InstrumentationErrors.resetErrors()
353+
352354
AgentMeter.registerIfAbsent(
353355
STATS_D_CLIENT,
354356
new MonitoringImpl(STATS_D_CLIENT, 10, TimeUnit.SECONDS),

dd-java-agent/instrumentation-testing/src/main/java/datadog/trace/agent/test/AbstractInstrumentationTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ public abstract class AbstractInstrumentationTest {
6969

7070
@BeforeAll
7171
static void initAll() {
72+
InstrumentationErrors.resetErrors();
73+
7274
// If this fails, it's likely the result of another test loading Config before it can be
7375
// injected into the bootstrap classpath.
7476
assertNull(Config.class.getClassLoader(), "Config must load on the bootstrap classpath.");

0 commit comments

Comments
 (0)