I decided to understand why my eclipse and maven had failures on server trunk while ant based build passed successfully.

I always thought it was something related to maven and my import in eclipse by m2clipse.

The first issue was that phoenix-deployment's pom.xml did not declare derby in the dependencies so most tests did not find the jdbc driver.

Second issue is the MockFileSystem: the path for m2 and eclipse based m2clipse import are not the same, so I changed the MockFileSystem (not committed yet, want to do this when all test pass in the current trunk) to use classpath resource lookup instead of direct File access. I also changed the ant build to take care of copying conf files to the test-classes folder.

One issue I had in eclipse is that I re-run tests without a "clean", so the var/mr folder and the testdb (derby) is there with the previous data and make some test to fail (maybe the tests should take care of having cleaned tables on test.setup)

Some tests was running multiple times: this is because of a TestSuite in torque [maybe THIS was the issue I thought I had in the previous paragraph]

But I still had failures: at the end I noticed that ant based build is not running phoenix-deployment tests... :-/

I still had differences: run-unit-tests only ran "*Test.java" and not "*TestCase.java", added them to the ant task.

Now I still see this failures in the ant based setup:

Rerun org.apache.james.experimental.imapserver.ExperimentalAuthenticatedStateTest.testSubscribeUS
testSubscribeUS(org.apache.james.experimental.imapserver.ExperimentalAuthenticatedStateTest)
org.apache.james.test.functional.imap.ProtocolSession$InvalidServerResponseException:
Location: /org/apache/james/test/functional/imap/scripts/Subscribe.test:31
LastClientMsg: a02 SUBSCRIBE subscribetest
Expected: 'a02 OK SUBSCRIBE completed.'
Actual   : 'a02 NO SUBSCRIBE Cannot subscribe.'
at org.apache.james.test.functional.imap.ProtocolSession$ServerResponse.checkResponse(ProtocolSession.java:304) at org.apache.james.test.functional.imap.ProtocolSession$ServerResponse.testProtocol(ProtocolSession.java:285) at org.apache.james.test.functional.imap.ProtocolSession.runSessions(ProtocolSession.java:86) at org.apache.james.test.functional.imap.AbstractProtocolTest.runSessions(AbstractProtocolTest.java:100) at org.apache.james.test.functional.imap.SimpleScriptedTestProtocol.scriptTest(SimpleScriptedTestProtocol.java:68) at org.apache.james.test.functional.imap.AbstractAuthenticatedStateTestSuite.testSubscribeUS(AbstractAuthenticatedStateTestSuite.java:77)
        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:324)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        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 org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


If I run this tests with java6 I see no errors, if I run them with 1.4 I see the error above.




test
org.apache.james.mailboxmanager.torque.TorqueMailboxManagerSelfTestCase
testListOne(org.apache.james.mailboxmanager.torque.TorqueMailboxManagerSelfTestCase)
junit.framework.AssertionFailedError: expected:<1> but was:<3>
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.failNotEquals(Assert.java:282)
        at junit.framework.Assert.assertEquals(Assert.java:64)
        at junit.framework.Assert.assertEquals(Assert.java:201)
        at junit.framework.Assert.assertEquals(Assert.java:207)
at org.apache.james.mailboxmanager.AbstractMailboxManagerSelfTestCase.testListOne(AbstractMailboxManagerSelfTestCase.java:64)
        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 junit.framework.TestCase.runTest(TestCase.java:154)
        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 org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

org.apache.james.mailboxmanager.impl.UidChangeTrackerTestCase
testFound(org.apache.james.mailboxmanager.impl.UidChangeTrackerTestCase)
java.lang.ClassCastException: java.lang.Long cannot be cast to org.apache.james.mailboxmanager.MessageResult at org.apache.james.mailboxmanager.impl.UidChangeTrackerTestCase.testFound(UidChangeTrackerTestCase.java:66)
        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 junit.framework.TestCase.runTest(TestCase.java:154)
        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 org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

testShouldNotIssueFlagsUpdateEventWhenFlagsNotIncluded(org.apache.james.mailboxmanager.impl.UidChangeTrackerTestCase)
java.lang.ClassCastException: org.apache.james.mailboxmanager.impl.MessageFlags cannot be cast to org.apache.james.mailboxmanager.MessageResult at org.apache.james.mailboxmanager.impl.UidChangeTrackerTestCase.testShouldNotIssueFlagsUpdateEventWhenFlagsNotIncluded(UidChangeTrackerTestCase.java:117)
        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 junit.framework.TestCase.runTest(TestCase.java:154)
        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 org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to