Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8.1
-
None
-
OS X Yosemite. JDK8 and Maven3
-
Don't Know (Unsure) - The default level
Description
Here is a gist of the output
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.oodt.cas.resource.queuerepo.TestXmlQueueRepository
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.168 sec <<< FAILURE!
Results :
Failed tests:
testMapping(org.apache.oodt.cas.resource.queuerepo.TestXmlQueueRepository)
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.227 s
[INFO] Finished at: 2015-04-05T15:54:54-07:00
[INFO] Final Memory: 32M/701M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.4:test (default-test) on project cas-resource: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/Aditya/Projects/oodt-new/oodt/resource/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
-------------------------------------------------------------------------------
Test set: org.apache.oodt.cas.resource.queuerepo.TestXmlQueueRepository
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.168 sec <<< FAILURE!
testMapping(org.apache.oodt.cas.resource.queuerepo.TestXmlQueueRepository) Time elapsed: 0.151 sec <<< FAILURE!
junit.framework.AssertionFailedError: expected:<[test-queue-1, quick]> but was:<[quick, test-queue-1]>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:280)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:71)
at org.apache.oodt.cas.resource.queuerepo.TestXmlQueueRepository.testMapping(TestXmlQueueRepository.java:64)
Possible patch – The assert fails because it was expecting queue to be [] but got [] instead, which seems to be the reverse of the expected output. The QueueManager uses a HashMap to represent the queue. Changing this a LinkedHashMap fixed the issue. I think this happens because there must be some difference in the way the hashcode function works between JDK7 and JDK8 and thus messing up the order of insertions into the HashMap in QueueManager. LinkedHashMap ensure correct order and thus ensure the test passes.