Skip to content

Commit

Permalink
Disable VirtualLazyTreeViewerTest#testContains() on Mac #1183
Browse files Browse the repository at this point in the history
The test case
org.eclipse.jface.tests.viewers.VirtualLazyTreeViewerTest.testContains
is randomly failing on Mac. Several other test cases accessing the data
of items in a tree viewer with lazy content provider have been disabled
on Mac due to some issue with the availability of the item data (bug
347491).

Since there is no value in executing this test when the functionality is
known to be broken and thus other related test cases are already
disabled, this change disables the random failing test.

Fixes #1183
  • Loading branch information
HeikoKlare committed Jan 29, 2024
1 parent e6a8072 commit ce26ac0
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ protected StructuredViewer createViewer(Composite parent) {
@Override
public void setUp() {
super.setUp();
// process events because the content provider uses an asyncExec to set the item count of the tree
// process events because the content provider uses an asyncExec to set the item
// count of the tree
processEvents();
}

Expand Down Expand Up @@ -240,4 +241,16 @@ public void testWorldChanged() {
}
super.testWorldChanged();
}

@Override
public void testContains() {
if (disableTestsBug347491) {
return;
}
if (setDataCalls == 0) {
System.err.println("SWT.SetData is not received. Cancelled test " + testName.getMethodName());
return;
}
super.testContains();
}
}

0 comments on commit ce26ac0

Please sign in to comment.