Community
Participate
Working Groups
org.eclipse.ui.tests testEditableText is failing on mac with the below stack trace N/A junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:55) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertFalse(Assert.java:39) at junit.framework.Assert.assertFalse(Assert.java:47) at junit.framework.TestCase.assertFalse(TestCase.java:219) at org.eclipse.ui.tests.internal.TextHandlerTest.testEditableText(TextHandlerTest.java:48)
This test fails in the build I20190128-1800 and every I-build after that. This test was not failing in the previous week's build I20190121-1415.
Looks like a side effect of *enabling* tests via bug 485167. I believe I've seen similar comments for Mac tests that something isn't working on Mac without extra settings. I will try to find out where I saw this.
New Gerrit change created: https://git.eclipse.org/r/137612
(In reply to Andrey Loskutov from comment #2) > Looks like a side effect of *enabling* tests via bug 485167. I believe I've > seen similar comments for Mac tests that something isn't working on Mac > without extra settings. I will try to find out where I saw this. This was about "On the Mac, checkboxes only take focus if "Full Keyboard Access" is enabled in the System Preferences." comment I saw in FindReplaceDialogTest. May be it is unrelated, but in the gerrit patch I've also added now an explicit focus() call on editable text.
Gerrit change https://git.eclipse.org/r/137612 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6ee864993a7335fdb7563373f075c3e50b8983d5
(In reply to Eclipse Genie from comment #5) > Gerrit change https://git.eclipse.org/r/137612 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=6ee864993a7335fdb7563373f075c3e50b8983d5 The changed test still fails, and it looks for me that Clipboard.setContents is broken on Mac. https://download.eclipse.org/eclipse/downloads/drops4/I20190226-1800/testresults/html/org.eclipse.ui.tests_ep411I-unit-mac64-java8_macosx.cocoa.x86_64_8.0.html junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:55) at junit.framework.Assert.assertTrue(Assert.java:22) at junit.framework.Assert.assertFalse(Assert.java:39) at junit.framework.Assert.assertFalse(Assert.java:47) at junit.framework.TestCase.assertFalse(TestCase.java:219) at org.eclipse.ui.tests.internal.TextHandlerTest.testEditableText(TextHandlerTest.java:59)
(In reply to Eclipse Genie from comment #5) > Gerrit change https://git.eclipse.org/r/137612 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=6ee864993a7335fdb7563373f075c3e50b8983d5 This change made the Windows test failing (additional to the existing failure). Since the change did not worked as intended do you want to revert it or should I provide a patch on top? The failure is that Clipboard#clearContents() does not guarantee to clear the clipboard (see also its javadoc). The fix is to first set anything and after clear. It might work on Mac because from reading the code it seem to ignore the restriction to only clear own content. I'm not sure why it works reliable on Linux. Apparently the clipboard is empty on Linux when starting the test but clipboard is not empty when test starts on Windows.
PS: a small addition. Because the test is failing for another reason if I run the full suite but failing on this change if I run only TextHandlerTest I cannot guarantee it would fail on this change when running full suite. Anyway, since the clear does not work as intended it makes the test less reliable.
New Gerrit change created: https://git.eclipse.org/r/156560
(In reply to Paul Pazderski from comment #7) > I'm not sure why it works reliable on > Linux. Apparently the clipboard is empty on Linux when starting the test but > clipboard is not empty when test starts on Windows. After the automated test now succeeded I noticed that it run the 'non editable' before the 'editable' and therefore guarantee an empty clipboard already. Still a detail that should be fix.
Gerrit change https://git.eclipse.org/r/156560 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=89b52c11dd898b72c7a7f538e66be37a6dd19d8f
(In reply to Eclipse Genie from comment #11) > Gerrit change https://git.eclipse.org/r/156560 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=89b52c11dd898b72c7a7f538e66be37a6dd19d8f > Is that supposed to fix the testEditableText test? If so, it did not work.
(In reply to Dani Megert from comment #12) > (In reply to Eclipse Genie from comment #11) > > Gerrit change https://git.eclipse.org/r/156560 was merged to [master]. > > Commit: > > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=89b52c11dd898b72c7a7f538e66be37a6dd19d8f > > > Is that supposed to fix the testEditableText test? If so, it did not work. It is only supposed to fix this test if run alone on Windows and as far as I can tell also on Mac. Clipboard clear does not clear (intentionally) foreign clipboard content. This is no problem in automated tests because testNonEditableText is run before and left an already empty clipboard. It is not supposed to fix the remaining test failure on Mac I cannot investigate myself.
Kalyan please check whether testEditableText fails locally. If not, disable the test.
(In reply to Dani Megert from comment #14) > Kalyan please check whether testEditableText fails locally. If not, disable > the test. This test fails locally on Mac.
(In reply to Kalyan Prasad Tatavarthi from comment #15) > (In reply to Dani Megert from comment #14) > > Kalyan please check whether testEditableText fails locally. If not, disable > > the test. > > This test fails locally on Mac. Please investigate when you find some time.
(In reply to Dani Megert from comment #16) > (In reply to Kalyan Prasad Tatavarthi from comment #15) > > (In reply to Dani Megert from comment #14) > > > Kalyan please check whether testEditableText fails locally. If not, disable > > > the test. > > > > This test fails locally on Mac. > Please investigate when you find some time. This test fails on Mac locally. I am investigating.
Ping!
New Gerrit change created: https://git.eclipse.org/r/158403
Gerrit change https://git.eclipse.org/r/158403 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=97e79b8d8d90570bf1e16da0402d231a55dd44cc
(In reply to Eclipse Genie from comment #20) > Gerrit change https://git.eclipse.org/r/158403 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=97e79b8d8d90570bf1e16da0402d231a55dd44cc This change disables testEditableText test on Mac OS.