This test is supposed to be verifying default initialization. Given that the
test method is called "propertiesTest()", it presumes there to be a
log4j.properties file in the default package somewhere on the classpath at
test startup. This must be so because it expects an appender specifically
named "D3".
I would expect the log4j.properties file to be in...
https://svn.apache.org/repos/asf/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/
That said, having log4j.properties (or log4j.xml) on the test classpath might
interfere with other tests. This makes me wonder if this testcase is meant to
be run with a custom classpath; distinct from the other tests?
...And my hunch is confirmed. Take a look at...
https://svn.apache.org/repos/asf/logging/log4j/branches/log4j12-bz53299/core/src/test/run-tests.bat
Here's a relevant snippet...
copy input\defaultInit3.properties target\classes\log4j.properties java
junit.textui.TestRunner org.apache.log4j.defaultInit.TestCase3 del
target\classes\log4j.properties
Here's a link to input\defaultInit3.properties...
https://svn.apache.org/repos/asf/logging/log4j/branches/log4j12-bz53299/core/src/test/resources/input/defaultInit3.properties
I suspect the previous build did something akin to what run-tests.bat is doing
in order to ensure test passage. The same technique may very well need to be
duplicated in the new build.
Jake
On Fri, 22 Jun 2012 11:57:00 +0200
Christian Grobmeier <[email protected]> wrote:
Hello guys,
I am looking at the build-branch:
https://svn.apache.org/repos/asf/logging/log4j/branches/log4j12-bz53299
This testcase:
org.apache.log4j.defaultInit.TestCase3
it fails, because it tells me the root logger is not configured.
Actually it looks like this TestCase is wrong, because we get a
RootLogger back configured with a NOPLoggerRepository, which returns
"not configured".
Like:
repositorySelector = new DefaultRepositorySelector(new
NOPLoggerRepository());
I am doubting my analysis is correct. Therefore I wonder what should
happen when the testcase runs.
Any ideas? Probably Jacob - you usually know very well about the
default behavior, could you look at this example?
Here is the code:
https://svn.apache.org/repos/asf/logging/log4j/branches/log4j12-bz53299/core/src/test/java/org/apache/log4j/defaultInit/TestCase3.java
Cheers
Christian
--
http://www.grobmeier.de
https://www.timeandbill.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]