Stop the context to make sure all files are compressed and closed.
Trying to remedy failures in CI builds.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/560120bc
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/560120bc
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/560120bc

Branch: refs/heads/LOG4J2-1390
Commit: 560120bc941d7bae6572a17980abbcd886364ba8
Parents: 60e47cb
Author: Gary Gregory <[email protected]>
Authored: Wed Sep 28 21:59:53 2016 -0700
Committer: Gary Gregory <[email protected]>
Committed: Wed Sep 28 21:59:53 2016 -0700

----------------------------------------------------------------------
 .../log4j/core/appender/rolling/RollingAppenderSizeTest.java      | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/560120bc/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
index 4b28d20..addc42d 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderSizeTest.java
@@ -34,6 +34,7 @@ import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.compress.compressors.CompressorException;
 import org.apache.commons.compress.compressors.CompressorInputStream;
@@ -138,6 +139,8 @@ public class RollingAppenderSizeTest {
                 || DefaultRolloverStrategy.FileExtensions.PACK200 == ext) {
             return; // Apache Commons Compress cannot deflate zip? TODO test 
decompressing these formats
         }
+        // Stop the context to make sure all files are compressed and closed. 
Trying to remedy failures in CI builds.
+        loggerContextRule.getLoggerContext().stop(30, TimeUnit.SECONDS);
         for (final File file : files) {
             if (file.getName().endsWith(fileExtension)) {
                 CompressorInputStream in = null;

Reply via email to