Author: bimargulies
Date: Tue Apr 8 19:28:06 2008
New Revision: 646181
URL: http://svn.apache.org/viewvc?rev=646181&view=rev
Log:
We were spitting all sorts of INFO at users, but our own unit tests were
set to WARNING, and didn't work when some INFO appeared.
Modified:
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/CommandInterfaceUtils.java
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
Modified:
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/CommandInterfaceUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/CommandInterfaceUtils.java?rev=646181&r1=646180&r2=646181&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/CommandInterfaceUtils.java
(original)
+++
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/CommandInterfaceUtils.java
Tue Apr 8 19:28:06 2008
@@ -29,24 +29,33 @@
*/
public final class CommandInterfaceUtils {
+ // when testing, don't change logging config.
+ private static boolean testInProgress;
+
private CommandInterfaceUtils() {
}
public static void commandCommonMain() {
- // force commons-logging into j.u.l so we can
- // configure it.
- System.setProperty("org.apache.commons.logging.Log",
- "org.apache.commons.logging.impl.Jdk14Logger");
- InputStream commandConfig = CommandInterfaceUtils.class
- .getResourceAsStream("commandLogging.properties");
- try {
+ if (!testInProgress) {
+ // force commons-logging into j.u.l so we can
+ // configure it.
+ System.setProperty("org.apache.commons.logging.Log",
+ "org.apache.commons.logging.impl.Jdk14Logger");
+ InputStream commandConfig = CommandInterfaceUtils.class
+ .getResourceAsStream("commandLogging.properties");
try {
- LogManager.getLogManager().readConfiguration(commandConfig);
- } finally {
- commandConfig.close();
+ try {
+
LogManager.getLogManager().readConfiguration(commandConfig);
+ } finally {
+ commandConfig.close();
+ }
+ } catch (IOException ioe) {
+ throw new RuntimeException(ioe);
}
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
}
+ }
+
+ public static void setTestInProgress(boolean testInProgress) {
+ CommandInterfaceUtils.testInProgress = testInProgress;
}
}
Modified:
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java?rev=646181&r1=646180&r2=646181&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
(original)
+++
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ToolTestBase.java
Tue Apr 8 19:28:06 2008
@@ -38,6 +38,7 @@
@Before
public void setUp() {
+ CommandInterfaceUtils.setTestInProgress(true);
oldStdErr = System.err;
oldStdOut = System.out;