Fix flaky test (#13358)

This commit is contained in:
Lauri Tulmin 2025-02-20 22:55:38 +02:00 committed by GitHub
parent 6cd791b00b
commit 1572fbfd6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,11 @@ final class ConfigurationFile {
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

View File

@ -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