Skip to content

Commit

Permalink
Fix flaky test (open-telemetry#13358)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored and kcsurapaneni committed Feb 21, 2025
1 parent aba23a3 commit 5a92938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ static Map<String, String> getProperties() {
return configFileContents;
}

// visible for tests
static void resetForTest() {
configFileContents = null;
}

// visible for tests
static Map<String, String> loadConfigFile() {
// Reading from system property first and from env after
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ConfigurationPropertiesSupplierTest {
@AfterAll
static void cleanUp() {
GlobalOpenTelemetry.resetForTest();
ConfigurationFile.resetForTest();
}

// regression for https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/6696
Expand Down

0 comments on commit 5a92938

Please sign in to comment.