From 300c27bc09cb99938e62e2fa7f83957effebc910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Mon, 11 Dec 2023 15:44:41 +0100 Subject: [PATCH] Add small pause after server aliveness check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juan Luis Cano Rodríguez --- features/steps/cli_steps.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/features/steps/cli_steps.py b/features/steps/cli_steps.py index 362da9be2c..d3d4f9afd1 100644 --- a/features/steps/cli_steps.py +++ b/features/steps/cli_steps.py @@ -4,7 +4,7 @@ import shutil import textwrap from pathlib import Path -from time import time +from time import sleep, time import behave import requests @@ -395,6 +395,8 @@ def wait_for_notebook_to_run(context, timeout): while time() < timeout_start + timeout: stdout = context.result.stdout.readline() if "http://127.0.0.1:" in stdout: + # Take a breath, and declare success + sleep(1) break if time() >= timeout_start + timeout: