Community
Participate
Working Groups
Build Identifier: The eclipse auto tests(3.4.2) in solaris-sparc10, it fails in jdk7-b96 due to expect a[1], but was a[3], see exceptions below: testSortMultipleCategory expected:<a[1]> but was:<a[3]> junit.framework.ComparisonFailure: expected:<a[1]> but was:<a[3]> at org.eclipse.ua.tests.help.other.ContextLinkSorter.testSortMultipleCategory(ContextLinkSorter.java:116) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138) at org.eclipse.test.UITestApplication.run(UITestApplication.java:60) at org.eclipse.test.UITestApplication.start(UITestApplication.java:210) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) at org.eclipse.core.launcher.Main.main(Main.java:30) Reproducible: Always Steps to Reproduce: 1.See bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=316827 2. 3.
Moving to UA
I believe that the reason why this test is failing is because the sort code from jdk7 is using a different algorithm and contexts which compare as equal end up in a non deterministic order. I will look into why the result of the comparing two different contexts is equality in some cases.
Are you using a Sun ( Oracle ) JRE?
Created attachment 189431 [details] Patch The algorithm was making too many assumptions about the sort - in particular it was assuming that compare() would be called on the elements in the order in which they appear in the array. The recoded algorithm only assumes that the sort is stable.
Patch committed to HEAD.