You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These tests have been disabled overtime because making sure they
pass consistently on Jenkins is difficult (See
[407862](https://bugs.eclipse.org/bugs/show_bug.cgi?id=407862) and
[553754](https://bugs.eclipse.org/bugs/show_bug.cgi?id=553754))
With GitHub actions these problems seem to be less of an issue, so we
should enable these tests again, at least on GHA.
This first commit is a test to see if they pass on GHA consistently, if
so adding a new check so that tests can be skipped on Jenkins releng
infra can be added.
Part of #2571
Copy file name to clipboardExpand all lines: tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1065,14 +1065,6 @@ public void test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_Con
@@ -1088,13 +1080,19 @@ public void test_postLorg_eclipse_swt_widgets_Event() {
1088
1080
shell.setBounds(display.getBounds());
1089
1081
shell.open();
1090
1082
1083
+
// The display.post needs to successfully obtain the focused window (at least on GTK3)
1084
+
// so we can send events to it. This processEvents gives SWT/GTK time to draw/focus/etc
1085
+
// the window so that org.eclipse.swt.widgets.Display.findFocusedWindow()
1086
+
// returns non-zero
1087
+
SwtTestUtil.processEvents();
1088
+
1091
1089
Eventevent;
1092
1090
1093
1091
// Test key events (down/up)
1094
1092
event = newEvent();
1095
1093
event.type = SWT.KeyDown;
1096
1094
event.keyCode = -1; // bogus key code; default 0 character
1097
-
assertTrue(display.post(event), "Display#post failed, probably because screen is not rendered (bug 407862)"); //$NON-NLS-1$
1095
+
assertTrue(display.post(event), "Display#post failed, probably because screen is not rendered (bug 407862) or because Shell is not focussed"); //$NON-NLS-1$
1098
1096
// don't test KeyDown/KeyUp with a character to avoid sending to
1099
1097
// random window if test shell looses focus
1100
1098
@@ -1121,14 +1119,22 @@ public void test_postLorg_eclipse_swt_widgets_Event() {
0 commit comments