Skip to content

Browser tests: reduce timeout for instantiation to reasonable value #1706

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class Test_org_eclipse_swt_browser_Browser extends Test_org_eclipse_swt_widgets_Composite {

// TODO Reduce to reasonable value
private static Duration MAXIMUM_BROWSER_CREATION_TIME = Duration.ofSeconds(90);
private static Duration MAXIMUM_BROWSER_CREATION_TIME = Duration.ofSeconds(10);

static {
try {
printSystemEnv();
} catch (Exception e) {
e.printStackTrace();
}
System.setProperty("org.eclipse.swt.internal.win32.Edge.timeout", Long.toString(MAXIMUM_BROWSER_CREATION_TIME.toMillis()));
System.setProperty("org.eclipse.swt.internal.win32.Edge.timeout", Long.toString(Duration.ofSeconds(90).toMillis()));
}

// CONFIG
Expand Down Expand Up @@ -206,6 +205,7 @@ public void setUp() {
}
shell.setText(shellTitle);
setWidget(browser); // For browser to occupy the whole shell, not just half of it.
shell.open();

testLog = new StringBuilder("\nTest log:\n");
if (SwtTestUtil.isGTK) {
Expand Down Expand Up @@ -1430,6 +1430,7 @@ public void test_VisibilityWindowListener_eventSize() {
@Override
@Test
public void test_isVisible() {
shell.setVisible(false);
// Note. This test sometimes crashes with webkit1 because shell.setVisible() calls g_main_context_iteration(). See Bug 509411
// To reproduce, try running test suite 20 times in a loop.
super.test_isVisible();
Expand Down
Loading