[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v0.9.18-60-gd87d66c

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Wed Mar 3 23:44:58 CET 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".

The branch, master has been updated
       via  d87d66c281909ad2e24013286821874416a2c87e (commit)
      from  176a1a7219de866a69604d8a8e81f8d759858d5e (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=d87d66c281909ad2e24013286821874416a2c87e
http://github.com/ceki/logback/commit/d87d66c281909ad2e24013286821874416a2c87e

commit d87d66c281909ad2e24013286821874416a2c87e
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Wed Mar 3 23:44:25 2010 +0100

    - make FileAppenderResilienceTest pass

diff --git a/logback-core/src/main/java/ch/qos/logback/core/recovery/RecoveryCoordinator.java b/logback-core/src/main/java/ch/qos/logback/core/recovery/RecoveryCoordinator.java
index 7f4b99f..25bfb7b 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/recovery/RecoveryCoordinator.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/recovery/RecoveryCoordinator.java
@@ -15,7 +15,7 @@ package ch.qos.logback.core.recovery;
 
 public class RecoveryCoordinator {
 
-  static long BACKOFF_COEFFICIENT_MIN = 100;
+  public final static long BACKOFF_COEFFICIENT_MIN = 100;
   static long BACKOFF_COEFFICIENT_MAX = 409600;  // BACKOFF_COEFFICIENT_MIN * 4^6
   
   private long backOffCoefficient = BACKOFF_COEFFICIENT_MIN;
diff --git a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
index 5df81f3..2b55163 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/FileAppenderResilienceTest.java
@@ -10,6 +10,7 @@ import org.junit.Test;
 
 import ch.qos.logback.core.contention.RunnableWithCounterAndDone;
 import ch.qos.logback.core.encoder.EchoEncoder;
+import ch.qos.logback.core.recovery.RecoveryCoordinator;
 import ch.qos.logback.core.recovery.ResilientFileOutputStream;
 import ch.qos.logback.core.status.OnConsoleStatusListener;
 import ch.qos.logback.core.testUtil.RandomUtil;
@@ -24,14 +25,15 @@ public class FileAppenderResilienceTest {
   String outputDirStr = CoreTestConstants.OUTPUT_DIR_PREFIX + "resilience-"
       + diff + "/";
 
-  //String outputDirStr = "\\\\192.168.1.3\\lbtest\\" + "resilience-"+ diff + "/";; 
+  // String outputDirStr = "\\\\192.168.1.3\\lbtest\\" + "resilience-"+ diff +
+  // "/";;
   String logfileStr = outputDirStr + "output.log";
 
   @Before
   public void setUp() throws InterruptedException {
 
     context.getStatusManager().add(new OnConsoleStatusListener());
-    
+
     File outputDir = new File(outputDirStr);
     outputDir.mkdirs();
 
@@ -55,15 +57,14 @@ public class FileAppenderResilienceTest {
     }
   }
 
-
   @Test
   public void smoke() throws InterruptedException, IOException {
     Runner runner = new Runner(fa);
     Thread t = new Thread(runner);
     t.start();
 
-    for (int i = 0; i < 10; i++) {
-      Thread.sleep(100);
+    for (int i = 0; i < 5; i++) {
+      Thread.sleep((int) (RecoveryCoordinator.BACKOFF_COEFFICIENT_MIN * 2));
       ResilientFileOutputStream resilientFOS = (ResilientFileOutputStream) fa
           .getOutputStream();
       FileChannel fileChannel = resilientFOS.getChannel();
@@ -88,7 +89,7 @@ class Runner extends RunnableWithCounterAndDone {
     while (!isDone()) {
       counter++;
       fa.doAppend("hello " + counter);
-      if (counter % 1024 == 0) {
+      if (counter % 512 == 0) {
         try {
           Thread.sleep(10);
         } catch (InterruptedException e) {

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

Summary of changes:
 .../logback/core/recovery/RecoveryCoordinator.java |    2 +-
 .../logback/core/FileAppenderResilienceTest.java   |   13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)


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


More information about the logback-dev mailing list