[LOGBack-dev] svn commit: r152 - logback/core/trunk/src/test/java/ch/qos/logback/core/rolling

noreply.seb at qos.ch noreply.seb at qos.ch
Wed Jul 19 17:04:02 CEST 2006


Author: seb
Date: Wed Jul 19 17:04:01 2006
New Revision: 152

Modified:
   logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/SizeBasedRollingTest.java
Log:
modified filling of the log files. The test didnt pass when launched right after a checkout.

Modified: logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/SizeBasedRollingTest.java
==============================================================================
--- logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/SizeBasedRollingTest.java	(original)
+++ logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/SizeBasedRollingTest.java	Wed Jul 19 17:04:01 2006
@@ -105,15 +105,20 @@
     rfa.start();
     	
     // Write exactly 10 bytes with each log
-    for (int i = 0; i < 25; i++) {
-      Thread.sleep(100);
-      if (i < 10) {
-    	rfa.doAppend("Hello---" + i);
-        //logger.debug("Hello---" + i);
-      } else if (i < 100) {
-    	rfa.doAppend("Hello---" + i);  
-        //logger.debug("Hello--" + i);
-      }
+//    for (int i = 0; i < 25; i++) {
+//      Thread.sleep(100);
+//      if (i < 10) {
+//    	rfa.doAppend("Hello---" + i);
+//        //logger.debug("Hello---" + i);
+//      } else if (i < 100) {
+//    	rfa.doAppend("Hello---" + i);  
+//        //logger.debug("Hello--" + i);
+//      }
+//    }
+    
+    for (int i = 0; i < 45; i++) {
+    	Thread.sleep(100);
+    	rfa.doAppend("hello");
     }
 
     assertTrue(new File(Constants.TEST_DIR_PREFIX + "output/sizeBased-test2.log").exists());
@@ -154,17 +159,22 @@
     rfa.start();
 
     // Write exactly 10 bytes with each log
-    for (int i = 0; i < 25; i++) {
-      Thread.sleep(100);
-      if (i < 10) {
-      	rfa.doAppend("Hello---" + i);     	  
-        //logger.debug("Hello---" + i);
-      } else if (i < 100) {
-      	rfa.doAppend("Hello---" + i);     	  
-        //logger.debug("Hello--" + i);
-      }
+//    for (int i = 0; i < 25; i++) {
+//      Thread.sleep(100);
+//      if (i < 10) {
+//      	rfa.doAppend("Hello---" + i);     	  
+//        //logger.debug("Hello---" + i);
+//      } else if (i < 100) {
+//      	rfa.doAppend("Hello---" + i);     	  
+//        //logger.debug("Hello--" + i);
+//      }
+//    }
+
+    for (int i = 0; i < 45; i++) {
+    	Thread.sleep(100);
+    	rfa.doAppend("hello");
     }
-
+    
     assertTrue(new File(Constants.TEST_DIR_PREFIX + "output/sbr-test3.log").exists());
     assertTrue(new File(Constants.TEST_DIR_PREFIX + "output/sbr-test3.0.gz").exists());
     assertTrue(new File(Constants.TEST_DIR_PREFIX + "output/sbr-test3.1.gz").exists());



More information about the logback-dev mailing list