Skip to content

Commit

Permalink
Make the test extensions defensively reset the GlobalOpenTelemetry in…
Browse files Browse the repository at this point in the history
…stance before setting. (#3110)
  • Loading branch information
jkwatson authored Apr 7, 2021
1 parent 531abc0 commit 9a330d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void clearSpans() {

@Override
protected void before() {
GlobalOpenTelemetry.resetForTest();
GlobalOpenTelemetry.set(openTelemetry);
clearSpans();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public void beforeEach(ExtensionContext context) {

@Override
public void beforeAll(ExtensionContext context) {
GlobalOpenTelemetry.resetForTest();
GlobalOpenTelemetry.set(openTelemetry);
}

Expand Down

0 comments on commit 9a330d0

Please sign in to comment.