[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.27-4-gd66cfee
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Thu Dec 30 01:19:46 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 d66cfee00547c4ca2b309dcae5f8e905f6f0a00d (commit)
from 8c7ac8c165d45d2de55c7f0122a19d573717e512 (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=d66cfee00547c4ca2b309dcae5f8e905f6f0a00d
http://github.com/ceki/logback/commit/d66cfee00547c4ca2b309dcae5f8e905f6f0a00d
commit d66cfee00547c4ca2b309dcae5f8e905f6f0a00d
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Dec 30 01:17:11 2010 +0100
parallelizing tests
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java b/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java
index fadaec3..fa8a260 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/ClassicTestConstants.java
@@ -17,9 +17,9 @@ import ch.qos.logback.core.util.CoreTestConstants;
public class ClassicTestConstants {
final static public String ISO_REGEX = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}";
- final static public String NAKED_MAIN_REGEX = "([mM]ain|pool-\\d-)([Tt]hread)?";
+ //pool-1-thread-47
+ final static public String NAKED_MAIN_REGEX = "([mM]ain|pool-\\d-)([Tt]hread)?(-\\d{1,3})?";
- //pool-1-thread-47]
final static public String MAIN_REGEX = "\\[" + NAKED_MAIN_REGEX + "\\]";
final static public String INPUT_PREFIX = "src/test/input/";
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/net/SocketAppenderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/net/SocketAppenderTest.java
index 45cf3b9..b5b6935 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/net/SocketAppenderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/net/SocketAppenderTest.java
@@ -20,6 +20,7 @@ import static org.junit.Assert.assertTrue;
import java.util.Map;
+import ch.qos.logback.core.testUtil.RandomUtil;
import org.junit.Test;
import org.slf4j.MDC;
import org.slf4j.Marker;
@@ -40,6 +41,9 @@ public class SocketAppenderTest {
static final int SLEEP_AFTER_LOG = 100;
int port = 4561;
+ int diff = RandomUtil.getPositiveInt();
+ String mdcKey = "key"+diff;
+
LoggerContext lc = new LoggerContext();
LoggerContext serverLC = new LoggerContext();
ListAppender<ILoggingEvent> la = new ListAppender<ILoggingEvent>();
@@ -116,7 +120,7 @@ public class SocketAppenderTest {
Logger logger = lc.getLogger(Logger.ROOT_LOGGER_NAME);
- MDC.put("key", "testValue");
+ MDC.put(mdcKey, "testValue");
logger.debug("test msg");
Thread.sleep(SLEEP_AFTER_LOG);
@@ -128,7 +132,7 @@ public class SocketAppenderTest {
ILoggingEvent remoteEvent = la.list.get(0);
Map<String, String> MDCPropertyMap = remoteEvent.getMDCPropertyMap();
- assertEquals("testValue", MDCPropertyMap.get("key"));
+ assertEquals("testValue", MDCPropertyMap.get(mdcKey));
assertNull(remoteEvent.getCallerData());
}
@@ -186,10 +190,10 @@ public class SocketAppenderTest {
Logger logger = lc.getLogger(Logger.ROOT_LOGGER_NAME);
- MDC.put("key", "testValue");
+ MDC.put(mdcKey, "testValue");
logger.debug("test msg");
- MDC.put("key", "updatedTestValue");
+ MDC.put(mdcKey, "updatedTestValue");
logger.debug("test msg 2");
Thread.sleep(SLEEP_AFTER_LOG);
@@ -204,7 +208,7 @@ public class SocketAppenderTest {
// the updated MDC property.
ILoggingEvent remoteEvent = la.list.get(1);
Map<String, String> MDCPropertyMap = remoteEvent.getMDCPropertyMap();
- assertEquals("updatedTestValue", MDCPropertyMap.get("key"));
+ assertEquals("updatedTestValue", MDCPropertyMap.get(mdcKey));
}
@Test
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
index f39f1f3..fa4dd7d 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/pattern/ConverterTest.java
@@ -100,6 +100,7 @@ public class ConverterTest {
DynamicConverter<ILoggingEvent> converter = new ThreadConverter();
StringBuilder buf = new StringBuilder();
converter.write(buf, le);
+ System.out.println(buf.toString());
String regex = ClassicTestConstants.NAKED_MAIN_REGEX;
assertTrue(buf.toString().matches(regex));
}
-----------------------------------------------------------------------
Summary of changes:
.../qos/logback/classic/ClassicTestConstants.java | 4 ++--
.../logback/classic/net/SocketAppenderTest.java | 14 +++++++++-----
.../qos/logback/classic/pattern/ConverterTest.java | 1 +
3 files changed, 12 insertions(+), 7 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list