Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331909 - [Workbench] Intermittent test failure in PlatformUITest.testWithoutDisplayAccess_sync()
Summary: [Workbench] Intermittent test failure in PlatformUITest.testWithoutDisplayAcc...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Paul Webster CLA
QA Contact: Paul Webster CLA
URL:
Whiteboard:
Keywords:
: 262194 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-06 10:19 EST by Oleg Besedin CLA
Modified: 2011-04-19 09:12 EDT (History)
4 users (show)

See Also:


Attachments
defined order v01 (2.54 KB, patch)
2011-01-05 12:58 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Besedin CLA 2010-12-06 10:19:39 EST
The PlatformUITest.testWithoutDisplayAccess_sync() test has been failing intermittently on Linux GTK test machine with the following stack trace:

No display during startup. See RCPTestWorkbenchAdvisor.preStartup() 

junit.framework.AssertionFailedError: No display during startup. See RCPTestWorkbenchAdvisor.preStartup()
at org.eclipse.ui.tests.rcp.PlatformUITest.testWithoutDisplayAccess_sync(PlatformUITest.java:117)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:416)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:249)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
at org.eclipse.core.launcher.Main.main(Main.java:34)


So far we have not been able to reproduce test failure locally; no relevant code changes seem to have happenned between the build in which the test failed and the builds in which the test passed.
Comment 1 Oleg Besedin CLA 2010-12-06 11:00:23 EST
The tests in the PlatformUITest added for the bug 182176 depend on the order in which tests were executed. 

For instance, for the test testDisplayAccess_sync() to pass, the test testCreateAndRunWorkbench() had to run first. (See CheckForWorkbench extends WorkbenchAdvisorObserver extends RCPTestWorkbenchAdvisor.)

The order of the tests in JUnit is undefined and probably changes when tests are repacked for the actual builds.
Comment 2 Paul Webster CLA 2010-12-06 11:05:33 EST
(In reply to comment #1)
> The order of the tests in JUnit is undefined and probably changes when tests
> are repacked for the actual builds.

This is true.  The only way to gaurantee order between test method executing is to specify the all of the tests when creating the test suites.

PW
Comment 3 Paul Webster CLA 2011-01-05 12:58:16 EST
Created attachment 186105 [details]
defined order v01

Control the order of the tests.

Released for the next nightly.

PW
Comment 4 Paul Webster CLA 2011-01-06 14:35:52 EST
I'll mark this as fixed, but we'll have to keep an eye on it.

PW
Comment 5 Paul Webster CLA 2011-01-25 09:03:23 EST
In I20110124-1345

Defining the test order has solved the issue.  If it crops up again we'll open a new bug.

PW
Comment 6 Dani Megert CLA 2011-04-14 10:41:35 EDT
*** Bug 262194 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2011-04-19 09:12:43 EDT
(In reply to comment #5)
> In I20110124-1345
> 
> Defining the test order has solved the issue.  If it crops up again we'll open
> a new bug.
This now fails again when run against Java 7, see bug 343261.