Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366851 - [Tests] slowdown in PartsReferencesTestSuite
Summary: [Tests] slowdown in PartsReferencesTestSuite
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 366451 381873
  Show dependency tree
 
Reported: 2011-12-15 13:06 EST by Paul Webster CLA
Modified: 2019-05-26 12:38 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2011-12-15 13:06:41 EST
fixing bug 366449 allows the tests to run, but they now take ~2600 seconds to run instead of 26 seconds.  They all pass, though.

We'll need to understand why and make some improvements.

PW
Comment 1 Oleg Besedin CLA 2012-01-31 16:53:07 EST
In short:

Those tests won't work with the current E4 code. I am surprised that they worked in 3.x; the fact that they currently "pass" in 4.x means that those tests are incorrectly constructed.

I'd recommend for the time being remove PartsReferencesTestSuite tests from automated runs and eventually re-do it using session tests framework.

====

Details:

What those tests do is that after some processing they dispose and recreate Display without taking down and starting up of the running instance.:

ViewsReferencesTest#disposeDisplay()
		display.dispose();

ViewsReferencesTest#createDisplay()
		display = PlatformUI.createDisplay();

The slowdown is [at least in part] caused by thousands (7K in a single test) of SWT exceptions thrown and logged:
Display.class :
		if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
"Device is disposed"

The first particular stumbling point is this code in E4Application:
		appContext.set(UISynchronize.class, new UISynchronize() {

			public void syncExec(Runnable runnable) {
				display.syncExec(runnable);
			}

			public void asyncExec(Runnable runnable) {
				display.asyncExec(runnable);
			}
		});

but I seriously doubt that this is the only place that will have to be fixed. Even E4Workbench#createE4Workbench(IApplicationContext applicationContext, final Display display) describes display as "final".
Comment 2 Rolf Theunissen CLA 2019-05-26 12:38:05 EDT
PartsReferencesTestSuite is no longer available:

Bug 441937 - Retire PartsReferencesTestSuite and related tests