Paul Smith schrieb:
The junit error disappeared, yet two tests fail. Output attached in
ZIP file...
In the extras package, TestLogMF fails. I attached the test result.
Maven stores the detailed failures in a target subfolder. In the
output, it mentions:
C:\Dokumente und Einstellungen\ThinkpadBenutzer\Eigene Dateien\Log4J
Workspace\log4j-chainsaw-maven\target\surefire-reports
containing the reports.
Could you please look for the failing test class file report in this
directory:
Running org.apache.log4j.chainsaw.prefs.MRUFileListTest
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec
<<< FAILURE!
Running org.apache.log4j.chainsaw.receivers.ReceiversHelperTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 sec
<<< FAILURE!
Running org.apache.log4j.chainsaw.LogPanelPreferenceModelTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 sec
<<< FAILURE!
(these ones)
Sure, attached. I got the impression that my log4j hasn't compiled
perfectly, even though it seemed so.
If you run with '-Dmaven.test.skip=true' it should not bother running
these tests. Are you doing this?
Yes.
mvn -Dmaven.test.skip=true package
For Chainsaw, and then you should be able to launch Chainsaw from:
target/appassembler/bin/chainsaw (.bat if you're windows)
Exactly. That gave me this startup exception that I mentioned.
Oliver
-------------------------------------------------------------------------------
Test set: org.apache.log4j.TestLogMF
-------------------------------------------------------------------------------
Tests run: 116, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 11.647 sec
<<< FAILURE!
testTraceFloat(org.apache.log4j.TestLogMF) Time elapsed: 0.13 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<.......> but was:<...,...>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at org.apache.log4j.TestLogMF.testTraceFloat(TestLogMF.java:225)
testTraceDouble(org.apache.log4j.TestLogMF) Time elapsed: 0.1 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<.......> but was:<...,...>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at org.apache.log4j.TestLogMF.testTraceDouble(TestLogMF.java:237)
-------------------------------------------------------------------------------
Test set: org.apache.log4j.chainsaw.prefs.MRUFileListTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.09 sec <<<
FAILURE!
warning(junit.framework.TestSuite$1) Time elapsed: 0.01 sec <<< FAILURE!
junit.framework.AssertionFailedError: Exception in constructor: testMRUFileList
(java.lang.Error: Unresolved compilation problem:
at
org.apache.log4j.chainsaw.prefs.MRUFileList.log4jMRU(MRUFileList.java:81)
at
org.apache.log4j.chainsaw.prefs.MRUFileListTest.<init>(MRUFileListTest.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at junit.framework.TestSuite.createTest(TestSuite.java:131)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
at junit.framework.TestSuite.<init>(TestSuite.java:75)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:151)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:197)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
warning(junit.framework.TestSuite$1) Time elapsed: 0 sec <<< FAILURE!
junit.framework.AssertionFailedError: Exception in constructor:
testSerialization (java.lang.Error: Unresolved compilation problem:
at
org.apache.log4j.chainsaw.prefs.MRUFileList.log4jMRU(MRUFileList.java:81)
at
org.apache.log4j.chainsaw.prefs.MRUFileListTest.<init>(MRUFileListTest.java:32)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at junit.framework.TestSuite.createTest(TestSuite.java:131)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
at junit.framework.TestSuite.<init>(TestSuite.java:75)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSet.java:151)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:197)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:263)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
-------------------------------------------------------------------------------
Test set: org.apache.log4j.chainsaw.receivers.ReceiversHelperTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 sec <<<
FAILURE!
testKnownReceivers(org.apache.log4j.chainsaw.receivers.ReceiversHelperTest)
Time elapsed: 0.01 sec <<< ERROR!
java.lang.Error: Unresolved compilation problem:
at
org.apache.log4j.chainsaw.receivers.ReceiversHelper.getInstance(ReceiversHelper.java:95)
at
org.apache.log4j.chainsaw.receivers.ReceiversHelperTest.testKnownReceivers(ReceiversHelperTest.java:37)
-------------------------------------------------------------------------------
Test set: org.apache.log4j.chainsaw.LogPanelPreferenceModelTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 sec <<<
FAILURE!
testLogPanelPreferenceModelSerialization(org.apache.log4j.chainsaw.LogPanelPreferenceModelTest)
Time elapsed: 0 sec <<< ERROR!
java.lang.Error: Unresolved compilation problems:
The import org.apache.log4j.LogManager cannot be resolved
The import org.apache.log4j.Logger cannot be resolved
Logger cannot be resolved to a type
LogManager cannot be resolved
at
org.apache.log4j.chainsaw.LogPanelPreferenceModel.<init>(LogPanelPreferenceModel.java:36)
at
org.apache.log4j.chainsaw.LogPanelPreferenceModelTest.testLogPanelPreferenceModelSerialization(LogPanelPreferenceModelTest.java:11)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]