From 7b50889334d752ad1d796fb0a0c3fa263146f91e Mon Sep 17 00:00:00 2001 From: Julien Arzul Date: Tue, 14 Apr 2026 15:28:16 +0200 Subject: [PATCH 1/2] Provide a bit more information about what timed out when expecting a prompt --- e2e-tests/src/utils/pexpect_utils.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/e2e-tests/src/utils/pexpect_utils.py b/e2e-tests/src/utils/pexpect_utils.py index 4f0ac266..426805cd 100644 --- a/e2e-tests/src/utils/pexpect_utils.py +++ b/e2e-tests/src/utils/pexpect_utils.py @@ -1,17 +1,23 @@ import allure -from pexpect import spawn +from pexpect import TIMEOUT, spawn from pexpect.popen_spawn import PopenSpawn @allure.step("Answering prompt '{pattern}' with '{value}'") def child_answer(child: PopenSpawn | spawn, pattern: str, value: str | None) -> None: - child.expect(pattern) + try: + child.expect(pattern) + except TIMEOUT as e: + raise AssertionError(f"Timed out while waiting for a prompt with the pattern {pattern}") from e child.sendline("" if value is None else str(value)) @allure.step("Answering sensitive prompt '{pattern}'") def child_answer_safe(child: PopenSpawn | spawn, pattern: str, value: str | None) -> None: - child.expect(pattern) + try: + child.expect(pattern) + except TIMEOUT as e: + raise AssertionError(f"Timed out while waiting for a prompt with the pattern {pattern}") from e send_secret(child, "" if value is None else str(value)) From ce2c1511bf5985938129e1f05bf59a04ed5cd8b9 Mon Sep 17 00:00:00 2001 From: Julien Arzul Date: Tue, 14 Apr 2026 15:29:21 +0200 Subject: [PATCH 2/2] Add new prompt expected when running any interactive flow to add a datasource --- e2e-tests/src/project_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e-tests/src/project_utils.py b/e2e-tests/src/project_utils.py index f0b6d48b..792438ba 100644 --- a/e2e-tests/src/project_utils.py +++ b/e2e-tests/src/project_utils.py @@ -73,6 +73,7 @@ def run_common_interactive_flow( child_answer(child, r"What type of datasource do you want to add\?", database.datasource_type) child_answer(child, r"Datasource name\?:", database.datasource_name) + child_answer(child, r"profiling\.enabled\?", "") if isinstance(database, SnowflakeDB): (child_answer_safe(child, r"connection\.account\?:", database.account),) child_answer(child, r"connection\.warehouse\? \(Optional\):", database.warehouse)