Skip to content

Commit a5eacf0

Browse files
committed
Browser tests: reduce timeout for instantiation to reasonable value
The timeout for browser instantiation in the browser tests has been increased to avoid flaky tests. However, browser instantiation taking more than 10 seconds (the previous timeout value) is an indicator for something being wrong with the instantiation. There is no reason why instantiation may take that long during test execution but the same issue should never arise in productive use, thus such a case should be captured by tests and, if necessary, be fixed productively. In order to do so, this change reduces the test timeout value again to a more reasonable value. Related to #1676
1 parent c49cee7 commit a5eacf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public static void setupEdgeEnvironment() {
163163
// initialize Edge environment before any test runs to isolate environment setup
164164
if (SwtTestUtil.isWindows) {
165165
Shell shell = new Shell();
166-
new Browser(shell, SWT.EDGE);
166+
new Browser(shell, SWT.EDGE).getUrl();
167167
shell.dispose();
168168
}
169169
}
@@ -302,7 +302,7 @@ private int reportOpenedDescriptors() {
302302
}
303303

304304
private Browser createBrowser(Shell s, int flags) {
305-
long maximumBrowserCreationMilliseconds = 90_000;
305+
long maximumBrowserCreationMilliseconds = 15_000;
306306
long createStartTime = System.currentTimeMillis();
307307
Browser b = new Browser(s, flags);
308308
// Wait for asynchronous initialization via getting URL

0 commit comments

Comments
 (0)