logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1557646 - /logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppenderRolloverTest.java
Date Mon, 13 Jan 2014 03:27:59 GMT
Author: rpopma
Date: Mon Jan 13 03:27:58 2014
New Revision: 1557646

URL: http://svn.apache.org/r1557646
Log:
give rollover some time to complete before asserting rollover completion

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppenderRolloverTest.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppenderRolloverTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppenderRolloverTest.java?rev=1557646&r1=1557645&r2=1557646&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppenderRolloverTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RollingRandomAccessFileAppenderRolloverTest.java
Mon Jan 13 03:27:58 2014
@@ -71,6 +71,12 @@ public class RollingRandomAccessFileAppe
         log.warn(trigger);
 
         ((LifeCycle) LogManager.getContext()).stop(); // stop async thread
+        
+        final int MAX_ATTEMPTS = 50;
+        int count = 0;
+        while (!after1.exists() && count++ < MAX_ATTEMPTS) {
+            Thread.sleep(50);
+        }
 
         assertTrue("afterRollover-1.log created", after1.exists());
 



Mime
View raw message