Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random failing VirtualTableViewerTest.testRenameWithSorter and VirtualTableViewerTest.testContains #1005

Closed
HeikoKlare opened this issue Aug 11, 2023 · 3 comments · Fixed by #1862
Labels
help wanted Extra attention is needed test junit test related things

Comments

@HeikoKlare
Copy link
Contributor

The test org.eclipse.jface.tests.viewers.VirtualTableViewerTest.testRenameWithSorter randomly fails, e.g. https://download.eclipse.org/eclipse/downloads/drops4/I20230810-1800/testresults/html/org.eclipse.jface.tests_ep429I-unit-macM1-java17_macosx.cocoa.aarch64_17.html

sorted first expected:<0-[0 name-999]9> but was:<0-[9 name-]9>

junit.framework.ComparisonFailure: sorted first expected:<0-[0 name-999]9> but was:<0-[9 name-]9>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.TestCase.assertEquals(TestCase.java:253)
at org.eclipse.jface.tests.viewers.VirtualTableViewerTest.testRenameWithSorter(VirtualTableViewerTest.java:244)
@HeikoKlare HeikoKlare changed the title Random failing VirtualTableViewerTest.testRenameWithSorter Random failing VirtualTableViewerTest.testRenameWithSorter and VirtualTableViewerTest.testContains Sep 12, 2023
@HeikoKlare
Copy link
Contributor Author

The test org.eclipse.jface.tests.viewers.VirtualTableViewerTest.testContains also randomly fails, e.g.,
https://github.com/eclipse-platform/eclipse.platform.ui/pull/1086/checks?check_run_id=16671995346

element must be available on the viewer
junit.framework.AssertionFailedError: element must be available on the viewer
	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.jface.tests.viewers.TableViewerTest.testContains(TableViewerTest.java:200)

@vogella
Copy link
Contributor

vogella commented Oct 18, 2023

Seems to fails all the time on Mac. @sratz could you have a look if this can be fixed or if it should be disabled on Mac?

@BeckerWdf
Copy link
Contributor

also reported in #1283

jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Dec 7, 2023
move "fViewer.getControl().update();" to front
eclipse-platform#1005
jukzi pushed a commit to jukzi/eclipse.platform.ui that referenced this issue Dec 7, 2023
move "fViewer.getControl().update();" to front
eclipse-platform#1005
@jukzi jukzi added the help wanted Extra attention is needed label Jan 23, 2024
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Apr 29, 2024
…ipse-platform#1005

Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
eclipse-platform#1583
May fix eclipse-platform#1005
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Apr 29, 2024
…ipse-platform#1005

Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
eclipse-platform#1583
May fix eclipse-platform#1005
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Apr 29, 2024
…ipse-platform#1005

Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
eclipse-platform#1583
May fix eclipse-platform#1005
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Apr 29, 2024
…ipse-platform#1005

Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active and
events are processed until the data is finally set properly. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
eclipse-platform#1583
May fix eclipse-platform#1005
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Apr 29, 2024
…ipse-platform#1005

Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active and
events are processed until the data is finally set properly. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
eclipse-platform#1583
May fix eclipse-platform#1005
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue May 1, 2024
…ipse-platform#1005

Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active and
events are processed until the data is finally set properly. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
eclipse-platform#1583
May fix eclipse-platform#1005
HeikoKlare added a commit that referenced this issue May 1, 2024
Several test cases of VirtualTableViewerTest randomly fail. This
includes explicit failures of testRenameWithSorter() and testContains()
and silent failures of other test cases that simply return successfully
even if the test actually failed. The reason is a missing processing of
an update of the table data, which is most likely caused by the shell
not having focus.

With this change, the test execution ensures that in cases where an
update of the table data is expected, the shell is forced active and
events are processed until the data is finally set properly. In
addition, early returns producing silent failures are replaced by
assertions leading to explicit failures in case the condition is still
not met.

Contributes to
#1583
May fix #1005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed test junit test related things
Projects
None yet
4 participants