Bug 310393 - Intermittent unittest failure in testSetProgressGroup
Summary: Intermittent unittest failure in testSetProgressGroup
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-25 15:26 EDT by Martin Oberhuber CLA
Modified: 2010-04-28 16:35 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2010-04-25 15:26:35 EDT
Build ID: I20100424-2000

Automated unittests on WinXP / Sun 1.5 failed on testSetProgressGroup.
The tests ran OK locally on WinXP / Sun 1.5.0_11, so it looks like an intermittent / timing problem.

From http://download.eclipse.org/eclipse/downloads/drops/I20100424-2000/testresults/html/org.eclipse.core.tests.runtime_win32.win32.x86.html :

	Timeout waiting for job to change state.

junit.framework.AssertionFailedError: Timeout waiting for job to change state.
at org.eclipse.core.tests.runtime.jobs.JobTest.waitForState(JobTest.java:1298)
at org.eclipse.core.tests.runtime.jobs.JobTest.testSetProgressGroup(JobTest.java:1178)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:376)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:209)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
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:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 John Arthorne CLA 2010-04-27 13:02:37 EDT
I logged this in bug 51538 comment 39. I like to keep all these in one place so I can if there is a pattern to the failures.

*** This bug has been marked as a duplicate of bug 51538 ***
Comment 2 John Arthorne CLA 2010-04-28 16:29:02 EDT
Actually on reviewing the test I see there is a potential timing problem in the test.
Comment 3 John Arthorne CLA 2010-04-28 16:33:59 EDT
The test did:

	longJob.schedule(100);
	longJob.setProgressGroup(group, 0);
	waitForState(longJob, Job.RUNNING);

This is vulnerable to a timing problem, where the job is canceled and completes before entering waitForState. Then since the job never enters the RUNNING state after that point the test fails.

I have reimplemented the test to use a barrier object to ensure the job is running at the time the progress group is set.
Comment 4 John Arthorne CLA 2010-04-28 16:34:46 EDT
Fix released for failures in comment #39 and 41. See bug 310393.
Comment 5 John Arthorne CLA 2010-04-28 16:35:17 EDT
Fix released.