[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.27-3-g8c7ac8c
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Wed Dec 29 19:24:12 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 8c7ac8c165d45d2de55c7f0122a19d573717e512 (commit)
from a0a585a04d230d2fd8d3f3a68c2faf40dafdabe9 (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=8c7ac8c165d45d2de55c7f0122a19d573717e512
http://github.com/ceki/logback/commit/8c7ac8c165d45d2de55c7f0122a19d573717e512
commit 8c7ac8c165d45d2de55c7f0122a19d573717e512
Author: Ceki Gulcu <ceki at qos.ch>
Date: Wed Dec 29 19:18:42 2010 +0100
trying to paralleize tests
diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index ed392a5..b939132 100644
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -296,9 +296,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
<configuration>
<!-- once, never, -->
<forkMode>once</forkMode>
+ <parallel>classes</parallel>
<reportFormat>plain</reportFormat>
<trimStackTrace>false</trimStackTrace>
<excludes>
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 a84c9e2..fadaec3 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,7 +17,10 @@ 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(\\sThread)?";
+ final static public String NAKED_MAIN_REGEX = "([mM]ain|pool-\\d-)([Tt]hread)?";
+
+ //pool-1-thread-47]
+
final static public String MAIN_REGEX = "\\[" + NAKED_MAIN_REGEX + "\\]";
final static public String INPUT_PREFIX = "src/test/input/";
final static public String JORAN_INPUT_PREFIX = INPUT_PREFIX + "joran/";
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
index 34b2ce6..2c1762f 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
@@ -82,10 +82,11 @@ public class PatternLayoutTest extends AbstractPatternLayoutBaseTest<ILoggingEve
String val = pl.doLayout(getEventObject());
// 2006-02-01 22:38:06,212 INFO [main] c.q.l.pattern.ConverterTest - Some
// message
+ //2010-12-29 19:04:26,137 INFO [pool-1-thread-47] c.q.l.c.pattern.ConverterTest - Some message
String regex = ISO_REGEX + " INFO " + MAIN_REGEX
+ " c.q.l.c.pattern.ConverterTest - Some message\\s*";
- assertTrue(val.matches(regex));
+ assertTrue("val="+val, val.matches(regex));
}
@Test
diff --git a/logback-core/pom.xml b/logback-core/pom.xml
index 4c2f517..05eb067 100644
--- a/logback-core/pom.xml
+++ b/logback-core/pom.xml
@@ -130,13 +130,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
<configuration>
<forkMode>once</forkMode>
<reportFormat>plain</reportFormat>
+ <parallel>classes</parallel>
+
<trimStackTrace>false</trimStackTrace>
<excludes>
<exclude>**/All*Test.java</exclude>
<exclude>**/PackageTest.java</exclude>
+ <exclude>**/ConsoleAppenderTest.java</exclude>
</excludes>
</configuration>
</plugin>
diff --git a/logback-core/src/test/java/ch/qos/logback/core/appender/ConsoleAppenderTest.java b/logback-core/src/test/java/ch/qos/logback/core/appender/ConsoleAppenderTest.java
index 19c8afa..734d197 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/appender/ConsoleAppenderTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/appender/ConsoleAppenderTest.java
@@ -39,7 +39,7 @@ public class ConsoleAppenderTest extends AbstractAppenderTest<Object> {
PrintStream original;
@Before
- public void setUp() throws Exception {
+ public void setUp() {
original = System.out;
// tee will output bytes on System out but it will also
// collect them so that the output can be compared against
@@ -54,7 +54,7 @@ public class ConsoleAppenderTest extends AbstractAppenderTest<Object> {
}
@After
- public void tearDown() throws Exception {
+ public void tearDown() {
System.setOut(original);
}
@@ -147,7 +147,7 @@ public class ConsoleAppenderTest extends AbstractAppenderTest<Object> {
StatusChecker checker = new StatusChecker(context);
//21:28:01,246 + WARN in ch.qos.logback.core.ConsoleAppender[null] - [foo] should be one of [SystemOut, SystemErr]
//21:28:01,246 |-WARN in ch.qos.logback.core.ConsoleAppender[null] - Using previously set target, System.out by default.
-
+
checker.containsMatch(Status.ERROR, "\\[foo\\] should be one of \\[SystemOut, SystemErr\\]");
}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
index da32e3f..9803c33 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/action/IncludeActionTest.java
@@ -82,12 +82,14 @@ public class IncludeActionTest {
int diff = RandomUtil.getPositiveInt();
+ StackAction stackAction = new StackAction();
+
@Before
public void setUp() throws Exception {
HashMap<Pattern, Action> rulesMap = new HashMap<Pattern, Action>();
rulesMap.put(new Pattern("x"), new NOPAction());
rulesMap.put(new Pattern("x/include"), new IncludeAction());
- rulesMap.put(new Pattern("x/stack"), new StackAction());
+ rulesMap.put(new Pattern("x/stack"), stackAction);
tc = new TrivialConfigurator(rulesMap);
tc.setContext(context);
@@ -100,7 +102,7 @@ public class IncludeActionTest {
System.clearProperty(INCLUDE_KEY);
System.clearProperty(SECOND_FILE_KEY);
System.clearProperty(SUB_FILE_KEY);
- StackAction.reset();
+ //StackAction.reset();
}
@Test
@@ -195,7 +197,7 @@ public class IncludeActionTest {
witness.push("a");
witness.push("b");
witness.push("c");
- assertEquals(witness, StackAction.stack);
+ assertEquals(witness, stackAction.getStack());
}
@Test
@@ -209,7 +211,7 @@ public class IncludeActionTest {
void verifyConfig(String[] expected) {
Stack<String> witness = new Stack<String>();
witness.addAll(Arrays.asList(expected));
- assertEquals(witness, StackAction.stack);
+ assertEquals(witness, stackAction.getStack());
}
}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/action/ext/StackAction.java b/logback-core/src/test/java/ch/qos/logback/core/joran/action/ext/StackAction.java
index e198345..eb4701e 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/action/ext/StackAction.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/action/ext/StackAction.java
@@ -22,19 +22,23 @@ import ch.qos.logback.core.joran.action.Action;
import ch.qos.logback.core.joran.spi.InterpretationContext;
-
public class StackAction extends Action {
- public static Stack<String> stack = new Stack<String>();
- public void begin(InterpretationContext ec, String name, Attributes attributes) {
- stack.push(attributes.getValue("name"));
- }
+ Stack<String> stack = new Stack<String>();
+
+ public Stack<String> getStack() {
+ return stack;
+ }
+
+ public void begin(InterpretationContext ec, String name, Attributes attributes) {
+ stack.push(attributes.getValue("name"));
+ }
- public void end(InterpretationContext ec, String name) {
- }
+ public void end(InterpretationContext ec, String name) {
+ }
- static public void reset() {
- stack.clear();
- }
+// static public void reset() {
+// stack.clear();
+// }
}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseAndIncludeCompositionTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseAndIncludeCompositionTest.java
index c354999..5cd9447 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseAndIncludeCompositionTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseAndIncludeCompositionTest.java
@@ -50,13 +50,15 @@ public class IfThenElseAndIncludeCompositionTest {
static final String NESTED_INCLUDE_FILE = CONDITIONAL_DIR_PREFIX+"nestedInclude.xml";
static final String THEN_FILE_TO_INCLUDE = CONDITIONAL_DIR_PREFIX+"includedA.xml";
static final String ELSE_FILE_TO_INCLUDE = CONDITIONAL_DIR_PREFIX+"includedB.xml";
-
+
+ StackAction stackAction = new StackAction();
+
@Before
public void setUp() throws Exception {
HashMap<Pattern, Action> rulesMap = new HashMap<Pattern, Action>();
rulesMap.put(new Pattern("x"), new NOPAction());
- rulesMap.put(new Pattern("x/stack"), new StackAction());
+ rulesMap.put(new Pattern("x/stack"), stackAction);
rulesMap.put(new Pattern("*/if"), new IfAction());
rulesMap.put(new Pattern("*/if/then"), new ThenAction());
rulesMap.put(new Pattern("*/if/then/*"), new NOPAction());
@@ -72,7 +74,7 @@ public class IfThenElseAndIncludeCompositionTest {
public void tearDown() throws Exception {
StatusPrinter.printInCaseOfErrorsOrWarnings(context);
context = null;
- StackAction.reset();
+ //StackAction.reset();
}
@Test
@@ -87,7 +89,7 @@ public class IfThenElseAndIncludeCompositionTest {
void verifyConfig(String[] expected) {
Stack<String> witness = new Stack<String>();
witness.addAll(Arrays.asList(expected));
- assertEquals(witness, StackAction.stack);
+ assertEquals(witness, stackAction.getStack());
}
}
diff --git a/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseTest.java b/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseTest.java
index 3a414e8..8ab6af3 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/joran/conditional/IfThenElseTest.java
@@ -46,12 +46,14 @@ public class IfThenElseTest {
static final String CONDITIONAL_DIR_PREFIX = CoreTestConstants.JORAN_INPUT_PREFIX
+ "conditional/";
-
+
+ StackAction stackAction = new StackAction();
+
@Before
public void setUp() throws Exception {
HashMap<Pattern, Action> rulesMap = new HashMap<Pattern, Action>();
rulesMap.put(new Pattern("x"), new NOPAction());
- rulesMap.put(new Pattern("x/stack"), new StackAction());
+ rulesMap.put(new Pattern("x/stack"), stackAction);
rulesMap.put(new Pattern("*/if"), new IfAction());
rulesMap.put(new Pattern("*/if/then"), new ThenAction());
rulesMap.put(new Pattern("*/if/then/*"), new NOPAction());
@@ -65,7 +67,7 @@ public class IfThenElseTest {
@After
public void tearDown() throws Exception {
StatusPrinter.printIfErrorsOccured(context);
- StackAction.reset();
+ //StackAction.reset();
}
@Test
@@ -107,7 +109,7 @@ public class IfThenElseTest {
void verifyConfig(String[] expected) {
Stack<String> witness = new Stack<String>();
witness.addAll(Arrays.asList(expected));
- assertEquals(witness, StackAction.stack);
+ assertEquals(witness, stackAction.getStack());
}
diff --git a/pom.xml b/pom.xml
index 992972d..6341755 100755
--- a/pom.xml
+++ b/pom.xml
@@ -32,9 +32,10 @@
<!-- slf4j.version property is used below, in
logback-classic/pom.xml and in setClasspath.cmd -->
<slf4j.version>1.6.1</slf4j.version>
- <junit.version>4.7</junit.version>
+ <junit.version>4.8.2</junit.version>
<janino.version>2.5.10</janino.version>
- <scala.version>2.7.7</scala.version>
+ <scala.version>2.7.7</scala.version>
+ <surefire.version>2.6</surefire.version>
<consolePlugin.version>1.1.0</consolePlugin.version>
</properties>
-----------------------------------------------------------------------
Summary of changes:
logback-classic/pom.xml | 2 +
.../qos/logback/classic/ClassicTestConstants.java | 5 +++-
.../ch/qos/logback/classic/PatternLayoutTest.java | 3 +-
logback-core/pom.xml | 4 +++
.../logback/core/appender/ConsoleAppenderTest.java | 6 ++--
.../core/joran/action/IncludeActionTest.java | 10 +++++---
.../logback/core/joran/action/ext/StackAction.java | 24 +++++++++++--------
.../IfThenElseAndIncludeCompositionTest.java | 10 +++++---
.../core/joran/conditional/IfThenElseTest.java | 10 +++++---
pom.xml | 5 ++-
10 files changed, 50 insertions(+), 29 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list