Bug 517231 - Several HandlerActivationTests fail on Mac
Summary: Several HandlerActivationTests fail on Mac
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Mac OS X
: P2 normal (vote)
Target Milestone: 4.7.1   Edit
Assignee: Lakshmi P Shanmugam CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2017-05-25 05:52 EDT by Dani Megert CLA
Modified: 2017-08-15 04:26 EDT (History)
4 users (show)

See Also:
noopur_gupta: review+
daniel_megert: review+


Attachments
patch (1.13 KB, patch)
2017-06-07 02:48 EDT, Lakshmi P Shanmugam CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2017-05-25 05:52:10 EDT
4.7 RC2 and earlier builds.
Comment 1 Dani Megert CLA 2017-05-25 05:53:09 EDT
Lakshmi, please check whether there's an obvious difference on Mac compared to other platforms where the tests pass fine.
Comment 2 Patrik Suzzi CLA 2017-05-25 06:13:52 EDT
I work both on Mac and on Win. When I get the source code under MacOS, I see an error that I cannot see in Windows. The issue is reported in Bug 517222.
Comment 3 Dani Megert CLA 2017-05-25 06:31:30 EDT
(In reply to Patrik Suzzi from comment #2)
> I work both on Mac and on Win. When I get the source code under MacOS, I see
> an error that I cannot see in Windows. The issue is reported in Bug 517222.

This is unrelated to this bug report.
Comment 4 Lakshmi P Shanmugam CLA 2017-05-29 05:10:01 EDT
There is an error dialog and another dialog open on the Mac test machine as seen in the screenshot -- http://download.eclipse.org/eclipse/downloads/drops4/I20170527-0800/testresults/ep47I-unit-mac64_macosx.cocoa.x86_64_8.0/org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_setCursorLocationII.png
Opened Bug 517350 to close the open dialogs.
Comment 5 Lakshmi P Shanmugam CLA 2017-05-29 06:02:01 EDT
Just checked the test result pages of earlier milestones, these tests have been failing since M3. The test results for M1 & M2 are not available, so not sure if they passed then. Dani, is there another bug that tracks the test failures in the older milestones?

I'm setting up the workspace to check if the tests pass locally.
Comment 6 Dani Megert CLA 2017-05-29 06:04:02 EDT
(In reply to Lakshmi Shanmugam from comment #5)
> Just checked the test result pages of earlier milestones, these tests have
> been failing since M3. The test results for M1 & M2 are not available, so
> not sure if they passed then. Dani, is there another bug that tracks the
> test failures in the older milestones?

I don't think so, but you can do a bugzilla search to verify that.
Comment 7 Lakshmi P Shanmugam CLA 2017-05-29 07:50:29 EDT
> 
> I'm setting up the workspace to check if the tests pass locally.
The tests fail locally as well.
Comment 8 Lakshmi P Shanmugam CLA 2017-06-02 06:09:17 EDT
The tests pass locally on 4.6. I spent some time debugging the tests and compared the code flow in 4.6 vs 4.7. 
In HandlerServicehandler.isHandled(), HandlerServiceImpl retrieves different EclipseContext in both cases. Will continue further investigation for 4.8.
Comment 9 Lakshmi P Shanmugam CLA 2017-06-07 01:58:44 EDT
The HandlerActivationTests fail due to error dialogs created by the PartRenderingTests.test_persistState_371087_1(). They can't find the correct active Shell due to the error dialogs. Running test_persistState_371087_1() causes multiple error dialogs, but the test doesn't fail, so not sure if it expected.
If I disable the test & run the UIAllTests, all the tests pass locally.

I think for 4.7RC4 we could disable PartRenderingTests.test_persistState_371087_1() on Mac and open a separate bug to track this.
Comment 10 Lakshmi P Shanmugam CLA 2017-06-07 02:48:44 EDT
Created attachment 268778 [details]
patch

test_persistState_371087_1 creates error dialogs which causes
HandlerActivationTests to fail on Mac. Disabled the test on Mac.

I'm unable to create a gerrit patch, hence attached the patch here.
Comment 11 Dani Megert CLA 2017-06-07 04:50:49 EDT
(In reply to Lakshmi Shanmugam from comment #10)
> I'm unable to create a gerrit patch, hence attached the patch here.

What's the problem?
Comment 12 Eclipse Genie CLA 2017-06-07 05:07:07 EDT
New Gerrit change created: https://git.eclipse.org/r/98763
Comment 13 Noopur Gupta CLA 2017-06-07 05:19:56 EDT
(In reply to Eclipse Genie from comment #12)
> New Gerrit change created: https://git.eclipse.org/r/98763

I have uploaded the patch from comment #10 as a Gerrit patch. 

I was not able to upload the Gerrit patch for platform.ui with Lakshmi as the author as I am not a committer on the project. Hence, I have added her as a co-author.

Reviewed the patch by code inspection that it disables the test.
Comment 14 Eclipse Genie CLA 2017-06-07 09:24:48 EDT
New Gerrit change created: https://git.eclipse.org/r/98801
Comment 17 Dani Megert CLA 2017-06-07 10:20:19 EDT
Increased bundle version for Photon (4.8) with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1004999ee6de0c656c6a8de637a6b64c539e252a
Comment 18 Lakshmi P Shanmugam CLA 2017-06-08 01:27:02 EDT
Thanks Noopur for creating the gerrit patch. 
I tried multiple times to create the gerrit, but got insufficient permissions error.
Comment 19 Dani Megert CLA 2017-06-08 04:47:58 EDT
(In reply to Lakshmi Shanmugam from comment #18)
> Thanks Noopur for creating the gerrit patch. 
> I tried multiple times to create the gerrit, but got insufficient
> permissions error.

The author and committer must be entered as:
Full name <e-mail>
e.g.
Dani Megert <Daniel_Megert@ch.ibm.com>

and the e-mail is case-sensitive (check in your Gerrit account).
Comment 20 Dani Megert CLA 2017-06-08 04:54:48 EDT
(In reply to Eclipse Genie from comment #15)
> Gerrit change https://git.eclipse.org/r/98801 was merged to
> [R4_7_maintenance].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1059b3f5d5f4ae71d617016ea437f4e00dd64837
> 

The e4.ui.tests passed in http://download.eclipse.org/eclipse/downloads/drops4/I20170607-2000/testResults.php
Comment 21 Dani Megert CLA 2017-06-09 03:49:13 EDT
(In reply to Dani Megert from comment #20)
> (In reply to Eclipse Genie from comment #15)
> > Gerrit change https://git.eclipse.org/r/98801 was merged to
> > [R4_7_maintenance].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1059b3f5d5f4ae71d617016ea437f4e00dd64837
> > 
> 
> The e4.ui.tests passed in
> http://download.eclipse.org/eclipse/downloads/drops4/I20170607-2000/testResults.php
> 

Looks like this was pure luck. Note that also other tests like bug 466636 fail again. I suspect something else is opening a dialog / stealing the focus.
Comment 22 Lakshmi P Shanmugam CLA 2017-07-06 06:37:14 EDT
After further investigation, found that the tests started failing due the changes made for this bug - https://bugs.eclipse.org/bugs/show_bug.cgi?id=499017.
 
There are 4 tests in PartRenderingEngineTests that throw RuntimeException and cause error dialogs to be opened - testBug331795_1, testBug331795_2, test_persistState_371087, test_persistState_371087_1.

The earlier patch disabled only test_persistState_371087_1 and that was enough for the tests to pass locally on my machine. Disabling the other 3 tests should prevent the failures on the test machine. But, I don't think that is the right solution.
Comment 23 Eclipse Genie CLA 2017-07-11 08:39:02 EDT
New Gerrit change created: https://git.eclipse.org/r/101052
Comment 25 Dani Megert CLA 2017-07-14 06:08:25 EDT
Let's watch the tests for a while and then backport to 4.7.1.
Comment 26 Dani Megert CLA 2017-07-16 10:42:47 EDT
(In reply to Dani Megert from comment #25)
> Let's watch the tests for a while and then backport to 4.7.1.

Looks like they all pass now on master.
Comment 27 Eclipse Genie CLA 2017-07-18 05:52:29 EDT
New Gerrit change created: https://git.eclipse.org/r/101411
Comment 28 Lakshmi P Shanmugam CLA 2017-07-18 05:56:21 EDT
(In reply to Eclipse Genie from comment #27)
> New Gerrit change created: https://git.eclipse.org/r/101411

Created gerrit patch for backporting to 4.7.1.
Comment 29 Lakshmi P Shanmugam CLA 2017-07-27 00:54:39 EDT
(In reply to Lakshmi Shanmugam from comment #28)
> (In reply to Eclipse Genie from comment #27)
> > New Gerrit change created: https://git.eclipse.org/r/101411
> 
> Created gerrit patch for backporting to 4.7.1.

The tests have failed again in the M-build - M20170726-0400. Dani, can you please push the gerrit change for 4.7.1?
Comment 30 Lakshmi P Shanmugam CLA 2017-08-03 07:21:15 EDT
(In reply to Lakshmi Shanmugam from comment #29)
> (In reply to Lakshmi Shanmugam from comment #28)
> > (In reply to Eclipse Genie from comment #27)
> > > New Gerrit change created: https://git.eclipse.org/r/101411
> > 
> > Created gerrit patch for backporting to 4.7.1.
> 
> The tests have failed again in the M-build - M20170726-0400. Dani, can you
> please push the gerrit change for 4.7.1?

The tests have failed again in this week's M-build - M20170802-0400.