Repository navigation
Closed
Description
When running random tests for #1581 the following error came up, see the modified test here:
eb37e7c
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeHi(TimSort.java:899)
at java.util.TimSort.mergeAt(TimSort.java:516)
at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
at java.util.TimSort.sort(TimSort.java:254)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1462)
at java.util.Collections.sort(Collections.java:175)
at com.graphhopper.routing.QueryGraph$3.apply(QueryGraph.java:277)
at com.graphhopper.routing.QueryGraph$3.apply(QueryGraph.java:269)
at com.carrotsearch.hppc.IntObjectHashMap.forEach(IntObjectHashMap.java:717)
at com.graphhopper.routing.QueryGraph.lookup(QueryGraph.java:269)
at com.graphhopper.routing.RandomCHRoutingTest.addVirtualNodesAndEdges(RandomCHRoutingTest.java:126)
at com.graphhopper.routing.RandomCHRoutingTest.issue1574_random(RandomCHRoutingTest.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Reacted by Peter
Activity
[-]Comparison method violates general contract error in QueryGraph#lookup.[/-][+]'Comparison method violates general contract' error in QueryGraph#lookup.[/+]Fixes #1582
michaz commentedon Apr 9, 2019
Nice catch. I took the liberty of fixing that on your branch. I think now the code does what the comment said it would do. ,-)
easbar commentedon Apr 9, 2019
Nice, thanks! Do you want to open a PR ? There is probably no need for the test case I added because it does many things not really related to this error.
Remove unclear test, #1582
[RSPS-1546] Upgrade to GH8 (#38)