Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 457868 - [Tests] Activate org.eclipse.ui.tests.navigator tests during Tycho build
Summary: [Tests] Activate org.eclipse.ui.tests.navigator tests during Tycho build
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.7 M2   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 457870
  Show dependency tree
 
Reported: 2015-01-19 12:58 EST by Lars Vogel CLA
Modified: 2016-09-09 08:17 EDT (History)
3 users (show)

See Also:
mistria: review?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-01-19 12:58:39 EST
Dani noted in https://bugs.eclipse.org/bugs/show_bug.cgi?id=457469#c14 that the navigator tests were failing. We should also activate them for the Gerrit build trigger.
Comment 1 Lars Vogel CLA 2015-01-19 13:15:53 EST
Bug 457868 - [Tests] Activate org.eclipse.ui.tests.navigator tests during Tycho build
Comment 2 Eclipse Genie CLA 2015-02-10 01:59:00 EST
New Gerrit change created: https://git.eclipse.org/r/41487
Comment 3 Lars Vogel CLA 2015-02-10 02:00:04 EST
If I run the tests via the Eclipse IDE, they work fine. But if I run them via Tycho they fail.

Results :

Failed tests: 
  PipelineTest.testNavigatorResourceJava:42 There should be two visible extensions for the pipeline viewer. expected:<2> but was:<1>

Tests in error: 
  JstPipelineTest.setUp:42 NullPointer

Tests run: 88, Failures: 1, Errors: 1, Skipped: 0


@Mickael, any idea how to solve this?
Comment 4 Mickael Istria CLA 2015-02-10 04:02:50 EST
I don't know in details, but typical reasons for failure with Tycho when it's working for IDE are:
* test sorting: IDE and Tycho may not run tests in the same order. The solution to overcome this issue is to have TestSuites to orchestrate tests instead of relying on runner conventions.
* Missing "behavioural" dependency: test bundle actually needs another bundle to be present in order to have tests succeeding. The depenency has to be added to the tycho-surefire-plugin configuration, or to the MANIFEST.MF (more portable but more intrusive)
Comment 5 Lars Vogel CLA 2015-02-10 04:19:34 EST
(In reply to Mickael Istria from comment #4)
> * test sorting: IDE and Tycho may not run tests in the same order. The
> solution to overcome this issue is to have TestSuites to orchestrate tests
> instead of relying on runner conventions.

AFAICS we are using TestSuites, see https://git.eclipse.org/r/#/c/41487

> * Missing "behavioural" dependency: test bundle actually needs another
> bundle to be present in order to have tests succeeding. The depenency has to
> be added to the tycho-surefire-plugin configuration, or to the MANIFEST.MF
> (more portable but more intrusive)

Is there a way to find out if that is the case?
Comment 6 Mickael Istria CLA 2015-02-10 04:26:10 EST
(In reply to Lars Vogel from comment #5)
> (In reply to Mickael Istria from comment #4)
> > * Missing "behavioural" dependency: test bundle actually needs another
> > bundle to be present in order to have tests succeeding. The depenency has to
> > be added to the tycho-surefire-plugin configuration, or to the MANIFEST.MF
> > (more portable but more intrusive)
> 
> Is there a way to find out if that is the case?

I don't know a systematic way to do this. When this happen, it's generally necessary to audit the code and bundle behaviour and find out hints of what could be missing.

And the reasons I gave were the 2 more frequent in other bundles that I worked on to support tycho-surefire-plugin, but there are many more possible causes.
Comment 7 Mickael Istria CLA 2015-02-10 12:44:07 EST
In that case, it appears the test uses an extension that is provided by JDT UI. I will submit a patch that fixes it, but that implies that there is a cyclic dependency between platform-ui and JDT-ui because of this test requirement.
Comment 8 Mickael Istria CLA 2015-02-10 13:14:03 EST
Suggested change: https://git.eclipse.org/r/#/c/41549/
Comment 9 Eclipse Genie CLA 2015-02-16 05:49:19 EST
New Gerrit change created: https://git.eclipse.org/r/41909
Comment 11 Lars Vogel CLA 2015-02-16 06:33:00 EST
Mickael with your change in http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e3ac8e052f3e09d75166cbb26530cf3b8243c3f6 the tests run locally fine for me but they still fail on the server. Do you know how to fix this?

https://git.eclipse.org/r/41487 contains the auto activation of the tests during the Gerrit build trigger.
Comment 12 Eclipse Genie CLA 2015-05-06 16:54:09 EDT
New Gerrit change created: https://git.eclipse.org/r/47376
Comment 13 Lars Vogel CLA 2016-04-20 12:17:51 EDT
Mass move to 4.7 as M7 is approaching. Please move back in case you are planning to fix it for Neon.
Comment 14 Lars Vogel CLA 2016-09-09 08:17:52 EDT
Mickael, IIRC you fixed that recently. Please reopen if that is wrong