commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [all] Commons SCXML 0.9 RC1 available
Date Mon, 24 Nov 2008 21:40:17 GMT
On 22/11/2008, Rahul Akolkar <rahul.akolkar@gmail.com> wrote:
> On Sat, Nov 22, 2008 at 8:46 AM, sebb <sebbaz@gmail.com> wrote:
>  > On 22/11/2008, Rahul Akolkar <rahul.akolkar@gmail.com> wrote:
>
> <snip/>
>
> >>
>  >>  I've been nudged before, but I'm OK with it being there.
>  >>
>  >
>  > OK by me too, so long as they are up to date, so I just ran a "maven
>  > test" and it completed successfully, and the same number of tests
>  > (228) was run, so I guess that's OK
>  >
>
> <snap/>
>
>  Its upto date.
>
>
>
>  > However, I also just ran "mvn test" again, and it failed with:
>  >
>  > -------------------------------------------------------------------------------
>  > Test set: org.apache.commons.scxml.model.ModelTestSuite
>  > -------------------------------------------------------------------------------
>  > Tests run: 78, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.641
>  > sec <<< FAILURE!
>  > testDatamodelNamespacePrefixedXPaths(org.apache.commons.scxml.model.DatamodelTest)
>  >  Time elapsed: 0.188 sec  <<< FAILURE!
>  > junit.framework.AssertionFailedError
>  >        at junit.framework.Assert.fail(Assert.java:47)
>  >        at org.apache.commons.scxml.model.DatamodelTest.fireEvent(DatamodelTest.java:195)
>  >        at org.apache.commons.scxml.model.DatamodelTest.runtest(DatamodelTest.java:150)
>  >        at org.apache.commons.scxml.model.DatamodelTest.testDatamodelNamespacePrefixedXPaths(DatamodelTest.java:114)
>  >
>  > The next 2 runs succeeded.
>  > There may be a timing error in that test - and it would help if the
>  > fail message gave a bit more information.
>  >
>
> <snip/>
>
>  Haven't seen that before. While it shouldn't matter, I usually clean
>  the previous build before switching (so, 'maven test' -> 'maven clean'
>  -> 'mvn test').
>

Actually, I was using a separate installation for the M1 build.
But it should not matter.

I've just seen the error again.
I updated the fail() message to fail(e+e.getMessage()) so I got a bit
more information:

-------------------------------------------------------------------------------
Test set: org.apache.commons.scxml.model.ModelTestSuite
-------------------------------------------------------------------------------
Tests run: 78, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.876
sec <<< FAILURE!
testDatamodelNamespacePrefixedXPaths(org.apache.commons.scxml.model.DatamodelTest)
 Time elapsed: 0.125 sec  <<< FAILURE!
junit.framework.AssertionFailedError: java.lang.NullPointerExceptionnull
	at junit.framework.Assert.fail(Assert.java:47)
	at org.apache.commons.scxml.model.DatamodelTest.fireEvent(DatamodelTest.java:195)
	at org.apache.commons.scxml.model.DatamodelTest.runtest(DatamodelTest.java:171)
	at org.apache.commons.scxml.model.DatamodelTest.testDatamodelNamespacePrefixedXPaths(DatamodelTest.java:114)

I think the fail(e.getMessage()) calls need to be updated to something
more useful, as the current code swallows all the useful information.
In test cases it's best to let the code throw an Exception - only
expected throwables should be caught by test cases.

I did this, and ran the test a few more times, and now I get:

-------------------------------------------------------------------------------
Test set: org.apache.commons.scxml.model.ModelTestSuite
-------------------------------------------------------------------------------
Tests run: 78, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.906
sec <<< FAILURE!
testDatamodelNamespacePrefixedXPaths(org.apache.commons.scxml.model.DatamodelTest)
 Time elapsed: 0.125 sec  <<< ERROR!
java.lang.NullPointerException
	at org.apache.commons.scxml.model.DatamodelTest.fireEvent(DatamodelTest.java:194)
	at org.apache.commons.scxml.model.DatamodelTest.runtest(DatamodelTest.java:181)
	at org.apache.commons.scxml.model.DatamodelTest.testDatamodelNamespacePrefixedXPaths(DatamodelTest.java:115)

It looks like the testExecutorSerializability() method is returning
null, though I'm not sure why as it appears the file is generated and
read OK. I replaced the File I/O with ByteArray I/O and I did not get
the error, though I did not test very many times

When I run the test on 1.4.2, I get a lot of messages:
SERIALIZATION ERROR: The DOM implementation in use is not serializable

This is possibly because the DOM implementation is being provided by
the JDK, as I don't get it with JDK 1.5.0 or 1.6.0.

Does JDK 1.4.2 require additional dependencies?

I think the test suite should be improved to give more details if/when
errors occur. At present errors are quite difficult to track down.

>
>  -Rahul
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message