Bug 351851 - [Compatibility] we need to fix up 122 errors in our org.eclipse.ui.tests bundle
Summary: [Compatibility] we need to fix up 122 errors in our org.eclipse.ui.tests bundle
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.2 M5   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 10:21 EDT by Paul Webster CLA
Modified: 2012-01-24 13:56 EST (History)
5 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-07-12 10:21:46 EDT
We have about 122 compile errors in org.eclipse.ui.tests.

We need to get rid of them in a controlled strategy:

1) we should probably enhance our "tweaklet" so that building and running in 4.2 has no errors by default, but running in 3.8 takes advantage of the tweaklet to run the older tests.

2) then we need to update the remaining errors to use the tweaklet in such a way that 3.8 runs the old tests and 4.2 runs either equivalent tests or ignores tests that are no longer relevant in 4.2




Here's just a sample:

Description	Resource	Path	Location	Type
The import org.eclipse.ui.internal.Perspective cannot be resolved	PerspectiveState.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests	line 18	Java Problem
The method getActivePerspective() is undefined for the type WorkbenchPage	PerspectiveState.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests	line 35	Java Problem
The method restoreState(XMLMemento, IPerspectiveDescriptor) is undefined for the type WorkbenchWindow	TrimLayoutTest.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api	line 287	Java Problem
The method restoreState(XMLMemento, IPerspectiveDescriptor) is undefined for the type WorkbenchWindow	TrimLayoutTest.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api	line 338	Java Problem
The method saveState(XMLMemento) is undefined for the type WorkbenchWindow	TrimLayoutTest.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api	line 221	Java Problem
The method saveState(XMLMemento) is undefined for the type WorkbenchWindow	TrimLayoutTest.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api	line 251	Java Problem
The method saveState(XMLMemento) is undefined for the type WorkbenchWindow	TrimLayoutTest.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/api	line 310	Java Problem
Perspective cannot be resolved to a type	UIDialogs.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs	line 94	Java Problem
Perspective cannot be resolved to a type	UIDialogs.java	/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/dialogs	line 101	Java Problem
Comment 1 Remy Suen CLA 2011-07-18 08:33:41 EDT
Sounds like we want both branches of the bundle to be identical, correct?

Since we have R3_development and R4_development we'd have to push fixes to one branch and then cherry pick them over to the other one, correct?
Comment 2 Paul Webster CLA 2011-07-18 09:38:12 EDT
(In reply to comment #1)
> Sounds like we want both branches of the bundle to be identical, correct?
> 
> Since we have R3_development and R4_development we'd have to push fixes to one
> branch and then cherry pick them over to the other one, correct?

I'm interested in ideas here.

One option is to hide certain operations and assertions behind a facade, and have each stream provide the facade that would actually compile.

Another option is to factor out specific tests to the different implementations into extra test bundles.

I prefer the first option, as even though those tests are testing internals, they also capture 3.x behaviour that we need to emulate in the compatibility layer.

PW
Comment 3 Remy Suen CLA 2011-07-27 09:29:53 EDT
(In reply to comment #2)
> One option is to hide certain operations and assertions behind a facade, and
> have each stream provide the facade that would actually compile.
> 
> Another option is to factor out specific tests to the different implementations
> into extra test bundles.

Well, either way they'd have to be kept in synch in both branches. I would fine with going with the first option as that is probably the least amount of work as well as being less disruptive than the latter.
Comment 4 Paul Webster CLA 2011-12-09 14:05:02 EST
OK, we decided to split the tests between 3.8 and 4.2.

Dean has done the work based off of 4.2 to remove the tweaklet and to get the UITestSuite running (even with the compile errors).  See http://git.eclipse.org/c/platform/eclipse.platform.ui.git/log/?h=droberts/bug351851

PW
Comment 5 Paul Webster CLA 2011-12-09 14:21:18 EST
The plan on Monday:

We'll merge Dean's changes into master, after 4.2 M4 ships.

Tests that aren't using API will represent as compile errors.  We need to convert them to new API (check presentation against the model/widgets/renderers).  We're not going to leave it as open-ended, but work on this for 3 days.

The goal is to 1) remove all compile errors in prep for the 4.2 long builds in M5, 2) convert as many tests to meaningful 4.2 tests as possible, and 3) when our 3 days are up, make sure the other tests are marked so we can find them but do not show up in the results as pass *or* fail.

I've broken the packages up amongst us.

Eric:
org.eclipse.ui.tests.dnd
org.eclipse.ui.tests.zoom

Remy:
org.eclipse.ui.tests.multieditor
org.eclipse.ui.tests.quickaccess

Paul:
org.eclipse.ui.tests.dynamicplugins
org.eclipse.ui.tests.services

Oleg:
org.eclipse.ui.tests.session

Dean:
org.eclipse.ui.tests.internal
org.eclipse.ui.parts.tests.util
Comment 6 Paul Webster CLA 2011-12-12 11:37:10 EST
Please run the test files and/or test suites that you fix (not the full UITestSuite for the moment, that's too slow)

Other bundles you need:

:extssh:pwebster@dev.eclipse.org:/cvsroot/eclipse
org.eclipse.test.performance

git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git
org.eclipse.core.tests.harness

The bundles like ui.tests.performance and ui.test.harness are in our eclipse.platform.ui git repo.

PW
Comment 7 Paul Webster CLA 2011-12-12 11:40:00 EST
Just FYI:  The easiest way to run the tests is to use context menu>Run As>Junit Plugin tests.

But I usually have to bump the test JVM to 1.6 to get reasonable results.

PW
Comment 8 Oleg Besedin CLA 2011-12-12 14:19:51 EST
(In reply to comment #5)
> org.eclipse.ui.tests.session

I fixed compile errors in session tests. The fixed tests are going to fail due to a number of reasons, most immediate being:

- The Bug95357Test: editor area is reported as not being visible (obscured by "Welcome"?), then DragOperations#drag() has this:

        Assert.fail("DND needs some updating");

- The Bug108033Test: "History" view is present that it does not expect (could be due to Git?)

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0d98115edaf95f17982215d3c9d54e435d26d1dd
Comment 9 Eric Moffatt CLA 2011-12-12 15:32:14 EST
Pushed in >20111212.

commit 88771cf53356ffabfbeab67c9db3ff068e2b60e5

This removes the compile errors from 'dnd' and 'zoom'. We have mostly failures when running (not really a surprise).
Comment 10 Paul Webster CLA 2011-12-13 10:47:59 EST
compiles at least
PW
Comment 11 Paul Webster CLA 2012-01-24 13:56:47 EST
Still compiles in I20120123-2200 :-)

PW