Skip to content

Commit

Permalink
set default metrics registry only if unset
Browse files Browse the repository at this point in the history
  • Loading branch information
thoniTUB committed Aug 6, 2024
1 parent b86d141 commit d163e0a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public abstract class AbstractSerializationTest {

@BeforeAll
public static void beforeAll() {
SharedMetricRegistries.setDefault(AbstractSerializationTest.class.getSimpleName());
// Some components need the shared registry, and it might have been set already by another test
if (SharedMetricRegistries.tryGetDefault() == null) {
SharedMetricRegistries.setDefault(AbstractSerializationTest.class.getSimpleName());
}
}


Expand Down

0 comments on commit d163e0a

Please sign in to comment.