| Summary: | 3 BindingPersistenceTest/s fail sometimes with an error on Linux GTK+ | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> | ||||
| Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | akurtakov, bsd, ericwill, gautier.desaintmartinlacaze, kalyan_prasad, Lars.Vogel, lufimtse, psuzzi | ||||
| Version: | 4.7 | ||||||
| Target Milestone: | 4.8 M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/112590 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4ea150c1052dd3505ee52065f12b61f4aac6bc6a https://git.eclipse.org/r/115198 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=576add7b9412e040d6a0ee654bc720a3d2a82294 |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Dani Megert
Created attachment 265129 [details]
Image: tests are running on windows
I just tested and I add some observations:
1. Tests are running in Windows with "Run As > JUnit Plug-in Test", see attached image
2. Tests are failing on finding a perfect binding for "F12" and "ALT+R", see below:
Here you can see the three failure points in tests:
testAboutBinding(BindingPersistenceTest.java:315)
final KeySequence keyF12 = Util.isMac() ? KeySequence.getInstance("M1+F12") : KeySequence.getInstance("F12");
final Binding editorBinding = bindingService.getPerfectMatch(keyF12);
assertNotNull(editorBinding); // fail
testAboutBindingIn3x(BindingPersistenceTest.java:388)
final KeySequence keyF12 = Util.isMac() ? KeySequence.getInstance("M1+F12") : KeySequence.getInstance("F12");
final Binding editorBinding = bindingService.getPerfectMatch(keyF12);
assertNotNull(editorBinding); // fail
testAboutBindingEmacs(BindingPersistenceTest.java:439)
final KeySequence keyAltR = KeySequence.getInstance("ALT+R");
final Binding findAndReplaceBinding = bindingService.getPerfectMatch(keyAltR);
assertNotNull(findAndReplaceBinding); // fail
They constantly failed in the last few builds. NOTE: They only fail on GTK+ 2. Mass move. Please move back to M6, if necessary Please set a target milestone again when you plan to fix the bug. Failed on GTK+ 2 and GTK+ 3: http://download.eclipse.org/eclipse/downloads/drops4/I20170725-2000/testResults.php I've been able to reproduce this when running the tests under Docker with Xvnc. Basically, there's a race condition where the tests assume that a IWorkbenchWindow is properly activated so that the appropriate binding contexts are set. The test failures doesn't always happen. And I've occasionally seen a failure where all BindingPersistenceTest tests fail with NPEs as the retrieved IBindingService is always null — here I can see that the window hasn't even become visible!
This error happens when I run with and without a window manager.
In the case where only the testAboutBinding* tests fail, the IBindingService's EBindingService's contextSet holds only a single context:
org.eclipse.ui.contexts.dialogAndWindow
whereas we normally have 11 contexts:
org.eclipse.ui.contexts.dialogAndWindow
org.eclipse.ui.NavigateActionSetresource
org.eclipse.ui.actionSet.keyBindings
org.eclipse.ui.actionSet.openFiles
org.eclipse.ui.cheatsheets.actionSet
org.eclipse.ui.contexts.window
org.eclipse.ui.edit.text.actionSet.annotationNavigation
org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo
org.eclipse.ui.edit.text.actionSet.navigation
org.eclipse.ui.tests.actionSet125011
org.eclipse.ui.tests.actionSets.brokenActionSet
org.eclipse.ui.tests.markers
The other tests in BindingPersistenceTest succeed as they use COPY, PASTE, or REDO, which are all defined in org.eclipse.ui.contexts.dialogAndWindow.
I thought I would try opening a test window for each of the tests by adding a doSetUp() to BindingPersistenceTest:
protected void doSetUp() throws Exception {
openTestWindow();
}
but that leads to all sorts of test failures due to an NPE as there is no IServiceLocatorCreator service available!
Caused by: java.lang.NullPointerException
at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:507)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
... 60 more
So the question is really: why are the tests starting on GTK before the window is fully activated? I don't see this on OS X.
(In reply to Brian de Alwis from comment #6) > So the question is really: why are the tests starting on GTK before the > window is fully activated? I don't see this on OS X. Can anyone working on GTK+ have a look? Can someone clarify, is this a regression of sorts? Any rough timeline when this started happening? M20170823-1700 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x The failure seems to be happening intermittently. M20170830-1700 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x Build I20171025-2000 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x Build M20171108-1700 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x (In reply to Leo Ufimtsev from comment #8) > Can someone clarify, is this a regression of sorts? Any rough timeline when > this started happening? You can see it dates back to 2016, so, not very useful. Someone just needs to take a look. It happens quite often lately. Build M20171115-1700 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x Build M20171122-1700 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x New Gerrit change created: https://git.eclipse.org/r/112590 Build M20171130-0510 The following 3 BindingPersistenceTest/s failed in the above build - testAboutBindingEmacs - testAboutBinding - testAboutBindingIn3x Gerrit change https://git.eclipse.org/r/112590 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4ea150c1052dd3505ee52065f12b61f4aac6bc6a Haven't failed lately after Lucas's changes. Resolving. New Gerrit change created: https://git.eclipse.org/r/115198 Gerrit change https://git.eclipse.org/r/115198 was merged to [R4_7_maintenance]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=576add7b9412e040d6a0ee654bc720a3d2a82294 |