logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r386351 - /logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java
Date Thu, 16 Mar 2006 15:13:13 GMT
Author: carnold
Date: Thu Mar 16 07:13:08 2006
New Revision: 386351

URL: http://svn.apache.org/viewcvs?rev=386351&view=rev
Log:
Bug 38982: Make test more forgiving if dispatch thread slow to start

Modified:
    logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java?rev=386351&r1=386350&r2=386351&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/AsyncAppenderTestCase.java Thu Mar
16 07:13:08 2006
@@ -207,10 +207,10 @@
     Vector events = blockableAppender.getVector();
 
     //
-    //   1 popped off of buffer by dispatcher before being blocked
+    //   0-1 popped off of buffer by dispatcher before being blocked
     //   5 in buffer before it filled up
     //   1 before Thread.sleep in greeter
-    assertEquals(7, events.size());
+    assertEquals(3, events.size()/2);
   }
 
   /**
@@ -430,11 +430,11 @@
         asyncAppender.close();
         Vector events = blockableAppender.getVector();
         //
-        //  1 event pulled from buffer by dispatcher before blocking
+        //  0-1 event pulled from buffer by dispatcher before blocking
         //  5 events in buffer
         //  1 summary event
         //
-        assertEquals(7, events.size());
+        assertEquals(3, events.size()/2);
         //
         //  last message should start with "Discarded"
         LoggingEvent event = (LoggingEvent) events.get(events.size() - 1);



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message