Some ResourceInitialSelectionTest tests fail intermittently
The tests
- org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndOneInitialSelectionWithInitialPattern
One file should be selected by default expected:<[L/org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest_1661392833486/foo.txt]> but was:<[]>
junit.framework.AssertionFailedError: One file should be selected by default expected:<[L/org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest_1661392833486/foo.txt]> but was:<[]>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.TestCase.assertEquals(TestCase.java:238)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndOneInitialSelectionWithInitialPattern(ResourceInitialSelectionTest.java:227)
- org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testSingleSelectionAndNoInitialSelectionWithInitialPattern
One file should be selected by default
junit.framework.AssertionFailedError: One file should be selected by default
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.Assert.assertFalse(Assert.java:39)
at junit.framework.TestCase.assertFalse(TestCase.java:208)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testSingleSelectionAndNoInitialSelectionWithInitialPattern(ResourceInitialSelectionTest.java:98)
failed in I-Build I20220824-1800 on Mac
This issues is created as a follow up to Bug 576361
The test org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndTwoInitialFilteredSelections fails on MacM1 with the below error
Two files should be selected by default
junit.framework.AssertionFailedError: Two files should be selected by default
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.TestCase.assertTrue(TestCase.java:192)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndTwoInitialFilteredSelections(ResourceInitialSelectionTest.java:331)
Test failure still occurs: https://github.com/eclipse-platform/eclipse.platform.ui/pull/970/checks?check_run_id=15356957783
The test org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndTwoInitialNonExistingSelectionWithInitialPattern fails on win-32 with the below error in build I20230927-1800
Problems encountered while deleting resources.
java.lang.AssertionError: Problems encountered while deleting resources.
at org.eclipse.ui.tests.dialogs.UIWorkingSetWizardsAuto.createAssertionError(UIWorkingSetWizardsAuto.java:156)
at org.eclipse.ui.tests.dialogs.UIWorkingSetWizardsAuto.cleanupWorkspace(UIWorkingSetWizardsAuto.java:141)
at org.eclipse.ui.tests.dialogs.UIWorkingSetWizardsAuto.doTearDown(UIWorkingSetWizardsAuto.java:123)
at org.eclipse.ui.tests.harness.util.UITestCase.tearDown(UITestCase.java:214)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
also
unit.framework.AssertionFailedError: Two files should be selected by default
at junit.framework.TestCase.assertTrue(TestCase.java:192)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndTwoInitialSelectionsWithInitialPattern(ResourceInitialSelectionTest.java:306)
https://github.com/eclipse-platform/eclipse.platform.ui/pull/1384/checks?check_run_id=19379975992
https://download.eclipse.org/eclipse/downloads/drops4/I20240619-1800/testresults/html/org.eclipse.ui.tests_ep433I-unit-mac64-java17_macosx.cocoa.x86_64_17.html
junit.framework.AssertionFailedError: The first file should be selected by default expected:<[L/org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest_1718858209743/foo.txt]> but was:<[]>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.TestCase.assertEquals(TestCase.java:238)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testSingleSelectionAndTwoInitialSelectionsWithInitialPattern(ResourceInitialSelectionTest.java:189)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
The title originally stated that tests fail in I-Builds, but they also fail in GH Actions builds quite often. I changed the title accordingly.
Another stack trace as posted in #2110 for the sake of documentation:
Fails in https://github.com/eclipse-platform/eclipse.platform.ui/pull/2106/checks?check_run_id=27615903246
One file should be selected by default
junit.framework.AssertionFailedError: One file should be selected by default
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.Assert.assertFalse(Assert.java:39)
at junit.framework.TestCase.assertFalse(TestCase.java:208)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testSingleSelectionAndNoInitialSelectionWithInitialPattern(ResourceInitialSelectionTest.java:97)
happend again https://download.eclipse.org/eclipse/downloads/drops4/I20240814-1800/testresults/html/org.eclipse.ui.tests_ep433I-unit-macM1-java17_macosx.cocoa.aarch64_17.html
junit.framework.AssertionFailedError: One file should be selected by default expected:<[L/org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest_1723688567872/foo.txt]> but was:<[]>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.TestCase.assertEquals(TestCase.java:238)
at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndOneInitialSelectionWithInitialPattern(ResourceInitialSelectionTest.java:226)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
Next attempt to fix this flacky test committed, lets see if that prevents the error, otherwise reopen or create new issue.
Failed again: https://github.com/eclipse-platform/eclipse.platform.ui/pull/3383/checks?check_run_id=52383678309
https://github.com/eclipse-platform/eclipse.platform.ui/pull/3448
One file should be selected by default expected:<[L/org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest_1761326641906/foo.txt]> but was:<[]> java.lang.AssertionError: One file should be selected by default expected:<[L/org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest_1761326641906/foo.txt]> but was:<[]> at org.junit.Assert.fail(Assert.java:89) at org.junit.Assert.failNotEquals(Assert.java:835) at org.junit.Assert.assertEquals(Assert.java:120) at org.eclipse.ui.tests.dialogs.ResourceInitialSelectionTest.testMultiSelectionAndOneInitialSelectionWithInitialPattern(ResourceInitialSelectionTest.java:216) at java.base/java.lang.reflect.Method.invoke(Method.java:580)
Looks like we have to do more event spinning.... PR is coming soon.