From 4c990a316388554a81e717b6a5a06c227334fa6f Mon Sep 17 00:00:00 2001 From: Eivind Jahren Date: Tue, 1 Oct 2024 15:10:27 +0200 Subject: [PATCH] Increase timeout for RunDialog opening in tests --- tests/ert/ui_tests/gui/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ert/ui_tests/gui/conftest.py b/tests/ert/ui_tests/gui/conftest.py index 15fb23fbb39..d3f038dddf4 100644 --- a/tests/ert/ui_tests/gui/conftest.py +++ b/tests/ert/ui_tests/gui/conftest.py @@ -285,7 +285,7 @@ def handle_dialog(): # The Run dialog opens, click show details and wait until done appears # then click it - run_dialog = wait_for_child(gui, qtbot, RunDialog) + run_dialog = wait_for_child(gui, qtbot, RunDialog, timeout=10000) qtbot.waitUntil(run_dialog.done_button.isVisible, timeout=200000) qtbot.waitUntil(lambda: run_dialog._tab_widget.currentWidget() is not None) @@ -411,9 +411,9 @@ def handle_add_dialog(): V = TypeVar("V") -def wait_for_child(gui, qtbot: QtBot, typ: Type[V], *args, **kwargs) -> V: - qtbot.waitUntil(lambda: gui.findChild(typ, *args, **kwargs) is not None) - return get_child(gui, typ, *args, **kwargs) +def wait_for_child(gui, qtbot: QtBot, typ: Type[V], timeout=5000, **kwargs) -> V: + qtbot.waitUntil(lambda: gui.findChild(typ) is not None, timeout=timeout) + return get_child(gui, typ, **kwargs) def get_child(gui: QWidget, typ: Type[V], *args, **kwargs) -> V: