From a87194cb87c524705d8337e28c1b2209203d5304 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 10 Feb 2020 19:56:44 -0800 Subject: [PATCH] Change IllegalStateException message in AbstractLoggingIntegrationTests.configureLogging() method to properly reflect intent. Call TestAppender.stop() in addition to clear() in the test tearDown() method. Resolves gh-73. --- .../slf4j/logback/AbstractLoggingIntegrationTests.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-geode-starter-logging/src/test/java/org/springframework/geode/logging/slf4j/logback/AbstractLoggingIntegrationTests.java b/spring-geode-starter-logging/src/test/java/org/springframework/geode/logging/slf4j/logback/AbstractLoggingIntegrationTests.java index 9bf6b739..b081f4eb 100644 --- a/spring-geode-starter-logging/src/test/java/org/springframework/geode/logging/slf4j/logback/AbstractLoggingIntegrationTests.java +++ b/spring-geode-starter-logging/src/test/java/org/springframework/geode/logging/slf4j/logback/AbstractLoggingIntegrationTests.java @@ -103,7 +103,7 @@ public abstract class AbstractLoggingIntegrationTests extends IntegrationTestsSu new ContextInitializer(loggerContext).autoConfig(); } catch (Exception cause) { - throw newIllegalStateException("Failed to initialize and configure SLF4J/Logback logging context", cause); + throw newIllegalStateException("Failed to configure and initialize SLF4J/Logback logging context", cause); } } @@ -141,7 +141,11 @@ public abstract class AbstractLoggingIntegrationTests extends IntegrationTestsSu @After public void tearDown() { - Optional.ofNullable(this.testAppender).ifPresent(TestAppender::clear); + Optional.ofNullable(this.testAppender).ifPresent(it -> { + it.clear(); + it.stop(); + }); + System.clearProperty(SPRING_BOOT_DATA_GEMFIRE_LOG_LEVEL_PROPERTY); } }