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

noreply.seb at qos.ch noreply.seb at qos.ch
Fri Jul 14 17:12:00 CEST 2006


Author: seb
Date: Fri Jul 14 17:11:59 2006
New Revision: 75

Modified:
   logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
Log:
path access modified


Modified: logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java
==============================================================================
--- logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java	(original)
+++ logback/core/trunk/src/test/java/ch/qos/logback/core/rolling/TimeBasedRollingTest.java	Fri Jul 14 17:11:59 2006
@@ -216,10 +216,10 @@
     }
 
     for (int i = 0; i < 3; i++) {
-      assertTrue(Compare.gzCompare(filenames[i], "src/test/witness/rolling/tbr-test3." + i + ".gz"));
+      assertTrue(Compare.gzCompare(filenames[i], Constants.TEST_DIR_PREFIX + "witness/rolling/tbr-test3." + i + ".gz"));
     }
 
-    assertTrue(Compare.compare(filenames[3], "src/test/witness/rolling/tbr-test3.3"));
+    assertTrue(Compare.compare(filenames[3], Constants.TEST_DIR_PREFIX + "witness/rolling/tbr-test3.3"));
   }
 
   /**
@@ -230,8 +230,8 @@
     rfa1.setLayout(layout);
     
     TimeBasedRollingPolicy tbrp1 = new TimeBasedRollingPolicy();
-    tbrp1.setActiveFileName("src/test/output/test4.log");
-    tbrp1.setFileNamePattern("src/test/output/test4-%d{" + DATE_PATTERN + "}");
+    tbrp1.setActiveFileName(Constants.TEST_DIR_PREFIX + "output/test4.log");
+    tbrp1.setFileNamePattern(Constants.TEST_DIR_PREFIX + "output/test4-%d{" + DATE_PATTERN + "}");
     tbrp1.start();
     rfa1.setRollingPolicy(tbrp1);
     rfa1.start();
@@ -243,10 +243,10 @@
     Calendar cal = Calendar.getInstance();
 
     for (int i = 0; i < 3; i++) {
-      filenames[i] = "src/test/output/test4-" + sdf.format(cal.getTime());
+      filenames[i] = Constants.TEST_DIR_PREFIX + "output/test4-" + sdf.format(cal.getTime());
       cal.add(Calendar.SECOND, 1);
     }
-    filenames[3] = "src/test/output/test4.log";
+    filenames[3] = Constants.TEST_DIR_PREFIX + "output/test4.log";
     
     System.out.println("Waiting until next second and 100 millis.");
     delayUntilNextSecond(100);
@@ -263,8 +263,8 @@
     rfa2.setLayout(layout);
 
     TimeBasedRollingPolicy tbrp2 = new TimeBasedRollingPolicy();
-    tbrp2.setFileNamePattern("src/test/output/test4-%d{" + DATE_PATTERN + "}");
-    tbrp2.setActiveFileName("src/test/output/test4.log");
+    tbrp2.setFileNamePattern(Constants.TEST_DIR_PREFIX + "output/test4-%d{" + DATE_PATTERN + "}");
+    tbrp2.setActiveFileName(Constants.TEST_DIR_PREFIX + "output/test4.log");
     tbrp2.start();
     rfa2.setRollingPolicy(tbrp2);
     rfa2.start();
@@ -275,7 +275,7 @@
     }
 
     for (int i = 0; i < 4; i++) {
-      assertTrue(Compare.compare(filenames[i], "src/test/witness/rolling/tbr-test4." + i));
+      assertTrue(Compare.compare(filenames[i], Constants.TEST_DIR_PREFIX + "witness/rolling/tbr-test4." + i));
     }
   }
 
@@ -287,8 +287,8 @@
     rfa.setLayout(layout);
 
     TimeBasedRollingPolicy tbrp = new TimeBasedRollingPolicy();
-    tbrp.setFileNamePattern("src/test/output/test5-%d{" + DATE_PATTERN + "}");
-    tbrp.setActiveFileName("src/test/output/test5.log");
+    tbrp.setFileNamePattern(Constants.TEST_DIR_PREFIX + "output/test5-%d{" + DATE_PATTERN + "}");
+    tbrp.setActiveFileName(Constants.TEST_DIR_PREFIX + "output/test5.log");
     tbrp.start();
     rfa.setRollingPolicy(tbrp);
     rfa.start();
@@ -299,11 +299,11 @@
     Calendar cal = Calendar.getInstance();
 
     for (int i = 0; i < 3; i++) {
-      filenames[i] = "src/test/output/test5-" + sdf.format(cal.getTime());
+      filenames[i] = Constants.TEST_DIR_PREFIX + "output/test5-" + sdf.format(cal.getTime());
       cal.add(Calendar.SECOND, 1);
     }
 
-    filenames[3] = "src/test/output/test5.log";
+    filenames[3] = Constants.TEST_DIR_PREFIX + "output/test5.log";
 
     System.out.println("Waiting until next second and 100 millis.");
     delayUntilNextSecond(100);
@@ -315,7 +315,7 @@
     }
 
     for (int i = 0; i < 4; i++) {
-      assertTrue(Compare.compare(filenames[i], "src/test/witness/rolling/tbr-test5." + i));
+      assertTrue(Compare.compare(filenames[i], Constants.TEST_DIR_PREFIX + "witness/rolling/tbr-test5." + i));
     }
   }
 
@@ -327,8 +327,8 @@
     rfa.setLayout(layout);
 
     TimeBasedRollingPolicy tbrp = new TimeBasedRollingPolicy();
-    tbrp.setFileNamePattern("src/test/output/test6-%d{" + DATE_PATTERN + "}.gz");
-    tbrp.setActiveFileName("src/test/output/test6.log");
+    tbrp.setFileNamePattern(Constants.TEST_DIR_PREFIX + "output/test6-%d{" + DATE_PATTERN + "}.gz");
+    tbrp.setActiveFileName(Constants.TEST_DIR_PREFIX + "output/test6.log");
     tbrp.start();
     rfa.setRollingPolicy(tbrp);
     rfa.start();
@@ -339,11 +339,11 @@
     Calendar cal = Calendar.getInstance();
 
     for (int i = 0; i < 3; i++) {
-      filenames[i] = "src/test/output/test6-" + sdf.format(cal.getTime()) + ".gz";
+      filenames[i] = Constants.TEST_DIR_PREFIX + "output/test6-" + sdf.format(cal.getTime()) + ".gz";
       cal.add(Calendar.SECOND, 1);
     }
 
-    filenames[3] = "src/test/output/test6.log";
+    filenames[3] = Constants.TEST_DIR_PREFIX + "output/test6.log";
 
     System.out.println("Waiting until next second and 100 millis.");
     delayUntilNextSecond(100);
@@ -359,10 +359,10 @@
     }
 
     for (int i = 0; i < 3; i++) {
-      assertTrue(Compare.gzCompare(filenames[i], "src/test/witness/rolling/tbr-test6." + i + ".gz"));
+      assertTrue(Compare.gzCompare(filenames[i], Constants.TEST_DIR_PREFIX + "witness/rolling/tbr-test6." + i + ".gz"));
     }
 
-    assertTrue(Compare.compare(filenames[3], "src/test/witness/rolling/tbr-test6.3"));
+    assertTrue(Compare.compare(filenames[3], Constants.TEST_DIR_PREFIX + "witness/rolling/tbr-test6.3"));
   }
 
 //  public void testWithJoran1() throws Exception {



More information about the logback-dev mailing list