diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-02-21 14:36:54 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-02-21 14:36:57 +0100 |
commit | 6d4b498a9c77be293a0b9baab78bf6fb730ad80d (patch) | |
tree | 38ea8ad950319af706b3db15624b6982358162ee /container-accesslogging/src/test/java/com/yahoo | |
parent | 8bd2a1514fcdf7604706f899ca96697a77b41731 (diff) |
Shutdown log handler thread at end of each test method
The log handler will shutdown the JVM (logAndDie) if the junit
temporarly folder rule performs cleanup prior to a log rotation.
Diffstat (limited to 'container-accesslogging/src/test/java/com/yahoo')
-rw-r--r-- | container-accesslogging/src/test/java/com/yahoo/container/logging/LogFileHandlerTestCase.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/container-accesslogging/src/test/java/com/yahoo/container/logging/LogFileHandlerTestCase.java b/container-accesslogging/src/test/java/com/yahoo/container/logging/LogFileHandlerTestCase.java index b401f8a914e..d7361eec488 100644 --- a/container-accesslogging/src/test/java/com/yahoo/container/logging/LogFileHandlerTestCase.java +++ b/container-accesslogging/src/test/java/com/yahoo/container/logging/LogFileHandlerTestCase.java @@ -58,6 +58,7 @@ public class LogFileHandlerTestCase { h.rotateNow(); h.publish(lr); h.flush(); + h.shutdown(); } @Test @@ -74,6 +75,7 @@ public class LogFileHandlerTestCase { LogRecord lr = new LogRecord(Level.INFO, "testDeleteFileFirst1"); h.publish(lr); h.flush(); + h.shutdown(); } @Test @@ -98,6 +100,7 @@ public class LogFileHandlerTestCase { lr = new LogRecord(Level.INFO, "testDeleteFileDuringLogging2"); h.publish(lr); h.flush(); + h.shutdown(); } @Test @@ -145,6 +148,7 @@ public class LogFileHandlerTestCase { assertThat(secondLength).isEqualTo(link); assertThat(31).isEqualTo(first); assertThat(secondLength).isEqualTo(second); + h.shutdown(); } @Test @@ -181,6 +185,7 @@ public class LogFileHandlerTestCase { assertThat(compressed).exists(); String unzipped = IOUtils.readAll(new InputStreamReader(new GZIPInputStream(new FileInputStream(compressed)))); assertThat(content).isEqualTo(unzipped); + h.shutdown(); } } |