Fix configLocationsWithConfigurationFileSystemProperty

See gh-32740
This commit is contained in:
Johnny Lim 2022-10-15 12:17:24 +09:00 committed by Andy Wilkinson
parent 1481676b54
commit 6b385a4f79

View File

@ -314,8 +314,8 @@ class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
void configLocationsWithConfigurationFileSystemProperty() {
System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, "custom-log4j2.properties");
try {
assertThat(this.loggingSystem.getStandardConfigLocations()).contains("log4j2-test.properties",
"log4j2-test.xml", "log4j2.properties", "log4j2.xml");
assertThat(this.loggingSystem.getStandardConfigLocations()).containsExactly("log4j2-test.properties",
"log4j2-test.xml", "log4j2.properties", "log4j2.xml", "custom-log4j2.properties");
}
finally {
System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);