[logback-dev] branch, master, updated. 1c9f5ace78ef615c63e8070abe61a074090ad755

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Tue Dec 1 22:08:35 CET 2009


The branch, master has been updated
       via  1c9f5ace78ef615c63e8070abe61a074090ad755 (commit)
       via  2e4bbf5459f43136a4a512646bfcc023f03f1476 (commit)
      from  f73e9afc1951ff45ebaae0d0806e6126aab37bc8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=1c9f5ace78ef615c63e8070abe61a074090ad755
http://github.com/ceki/logback/commit/1c9f5ace78ef615c63e8070abe61a074090ad755

commit 1c9f5ace78ef615c63e8070abe61a074090ad755
Merge: 2e4bbf5 f73e9af
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Tue Dec 1 22:06:57 2009 +0100

    Merge branch 'master' of git at git.qos.ch:logback


http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=2e4bbf5459f43136a4a512646bfcc023f03f1476
http://github.com/ceki/logback/commit/2e4bbf5459f43136a4a512646bfcc023f03f1476

commit 2e4bbf5459f43136a4a512646bfcc023f03f1476
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Tue Dec 1 22:05:58 2009 +0100

    working on LBCORE-119

diff --git a/logback-classic/src/test/input/turbo/scan 2.xml b/logback-classic/src/test/input/turbo/scan 2.xml
new file mode 100644
index 0000000..d9df3a0
--- /dev/null
+++ b/logback-classic/src/test/input/turbo/scan 2.xml	
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration>
+
+<configuration scan="true" scanPeriod="50 millisecond">
+  <root level="ERROR"/>  
+</configuration> 
+       
\ No newline at end of file
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/turbo/ReconfigureOnChangeTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/turbo/ReconfigureOnChangeTest.java
index 2757984..2aa2078 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/turbo/ReconfigureOnChangeTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/turbo/ReconfigureOnChangeTest.java
@@ -44,7 +44,10 @@ public class ReconfigureOnChangeTest {
 
   final static String SCAN1_FILE_AS_STR = TeztConstants.TEST_DIR_PREFIX
       + "input/turbo/scan1.xml";
-
+  
+  final static String SCAN2_FILE_AS_STR = TeztConstants.TEST_DIR_PREFIX
+  + "input/turbo/scan 2.xml";
+  
   // it actually takes time for Windows to propagate file modification changes
   // values below 100 milliseconds can be problematic
   // the same propagation latency occurs in Linux but is even larger (>600 ms)
@@ -66,14 +69,13 @@ public class ReconfigureOnChangeTest {
 
   }
 
-  void configure(String file) throws JoranException {
+  void configure(File file) throws JoranException {
     JoranConfigurator jc = new JoranConfigurator();
     jc.setContext(loggerContext);
     jc.doConfigure(file);
   }
 
   RunnableWithCounterAndDone[] buildRunnableArray(File configFile) {
-
     RunnableWithCounterAndDone[] rArray = new RunnableWithCounterAndDone[THREAD_COUNT];
     rArray[0] = new Updater(configFile);
     for (int i = 1; i < THREAD_COUNT; i++) {
@@ -82,11 +84,31 @@ public class ReconfigureOnChangeTest {
     return rArray;
   }
 
+
+  @Test
+  public void lbcore119() throws JoranException, InterruptedException {
+    File file = new File(SCAN2_FILE_AS_STR);
+    
+    JoranConfigurator jc = new JoranConfigurator();
+    jc.setContext(loggerContext);
+    jc.doConfigure(file);
+    
+    RunnableWithCounterAndDone[] runnableArray = buildRunnableArray(file);
+    harness.execute(runnableArray);
+
+    loggerContext.getStatusManager().add(
+        new InfoStatus("end of execution ", this));
+
+    long expectedRreconfigurations = runnableArray[0].getCounter();
+    verify(expectedRreconfigurations);
+    
+  }
+  
   // Tests whether ConfigurationAction is installing ReconfigureOnChangeFilter
   @Test
   public void scan1() throws JoranException, IOException, InterruptedException {
-    configure(SCAN1_FILE_AS_STR);
     File file = new File(SCAN1_FILE_AS_STR);
+    configure(file);
     RunnableWithCounterAndDone[] runnableArray = buildRunnableArray(file);
     harness.execute(runnableArray);
 
@@ -94,7 +116,11 @@ public class ReconfigureOnChangeTest {
         new InfoStatus("end of execution ", this));
 
     long expectedRreconfigurations = runnableArray[0].getCounter();
+    verify(expectedRreconfigurations);
+  }
 
+  
+  void verify(long expectedRreconfigurations) {
     StatusChecker checker = new StatusChecker(loggerContext);
     try {
       assertTrue(checker.isErrorFree());
@@ -112,7 +138,7 @@ public class ReconfigureOnChangeTest {
       StatusPrinter.print(loggerContext);
     }
   }
-
+  
   ReconfigureOnChangeFilter initROCF() throws MalformedURLException {
     ReconfigureOnChangeFilter rocf = new ReconfigureOnChangeFilter();
     rocf.setContext(loggerContext);

-----------------------------------------------------------------------

Summary of changes:
 .../src/test/input/turbo/{scan1.xml => scan 2.xml} |    0
 .../classic/turbo/ReconfigureOnChangeTest.java     |   36 +++++++++++++++++---
 2 files changed, 31 insertions(+), 5 deletions(-)
 copy logback-classic/src/test/input/turbo/{scan1.xml => scan 2.xml} (100%)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list