Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 66168

Summary: Failing integration build test
Product: [Eclipse Project] Platform Reporter: John Arthorne <john.arthorne>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton
Version: 3.0   
Target Milestone: 3.0 RC2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John Arthorne CLA 2004-06-08 12:32:24 EDT
I20040607

Test failing with:

Timeout waiting for job to complete

junit.framework.AssertionFailedError: Timeout waiting for job to complete
at
org.eclipse.core.tests.runtime.jobs.IJobManagerTest.waitForCompletion(IJobManagerTest.java:1357)
at
org.eclipse.core.tests.runtime.jobs.IJobManagerTest.testBug57656(IJobManagerTest.java:188)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:322)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:198)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:334)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:638)
at org.eclipse.core.launcher.Main.main(Main.java:622)
Comment 1 John Arthorne CLA 2004-06-08 12:35:09 EDT
InternalJob.compareTo, used to compare entries in job queues, was returning the
difference between two longs cast as an integer. If the difference is greater
than the largest possible integer, it was wrapping and returning a negative
integer. This caused invalid sorting in the job queue. Old code:

	return (int) (((InternalJob) otherJob).startTime - startTime);

New code:

	return ((InternalJob) otherJob).startTime >= startTime ? 1 : -1;

CC DJ for fix approval.
Comment 2 DJ Houghton CLA 2004-06-08 13:48:35 EDT
Sounds like a heck of a good change to me.
Comment 3 John Arthorne CLA 2004-06-08 13:57:28 EDT
I will make sure it gets into the 4pm build.