Skip to content

Commit 95b8d19

Browse files
committed
Remove blind settle delay from code mining test fixtures
CodeMiningTest.setUp() and CodeMiningLineHeaderAnnotationTest.setUp() both ended with DisplayHelper.sleep(display, 1000), placed directly after a waitForCondition() that had already established that the text widget is visible. DisplayHelper.sleep() is waitForCondition() with the condition hardcoded to false, so it always burns the full second. CodeMiningTest installs its provider on an empty document, and the provider skips blank lines, so no code minings are produced during setUp and there is nothing to settle for. Measured on a full CI run, CodeMiningTest is 22.6s over 19 tests with a median of 1.04s against a minimum of 0.19s, and CodeMiningLineHeaderAnnotationTest is 4.0s over 4 tests with minimum and median both 1.01s.
1 parent 86e17df commit 95b8d19

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningLineHeaderAnnotationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ protected boolean condition() {
7070
return fViewer.getTextWidget().isVisible();
7171
}
7272
}.waitForCondition(display, 3000));
73-
DisplayHelper.sleep(textWidget.getDisplay(), 1000);
7473
}
7574

7675
@AfterEach

tests/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ protected boolean condition() {
132132
return fViewer.getTextWidget().isVisible();
133133
}
134134
}.waitForCondition(display, 3000));
135-
DisplayHelper.sleep(textWidget.getDisplay(), 1000);
136135
}
137136

138137
@AfterEach

0 commit comments

Comments
 (0)