Skip to content

Commit

Permalink
Browser tests: reduce timeout for instantiation to reasonable value
Browse files Browse the repository at this point in the history
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
  • Loading branch information
HeikoKlare committed Jan 13, 2025
1 parent c49cee7 commit a5eacf0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public static void setupEdgeEnvironment() {
// initialize Edge environment before any test runs to isolate environment setup
if (SwtTestUtil.isWindows) {
Shell shell = new Shell();
new Browser(shell, SWT.EDGE);
new Browser(shell, SWT.EDGE).getUrl();
shell.dispose();
}
}
Expand Down Expand Up @@ -302,7 +302,7 @@ private int reportOpenedDescriptors() {
}

private Browser createBrowser(Shell s, int flags) {
long maximumBrowserCreationMilliseconds = 90_000;
long maximumBrowserCreationMilliseconds = 15_000;
long createStartTime = System.currentTimeMillis();
Browser b = new Browser(s, flags);
// Wait for asynchronous initialization via getting URL
Expand Down

0 comments on commit a5eacf0

Please sign in to comment.