From 1465ce1eea3da3751c5a52ec8fefeb78dcb012c9 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 17 May 2025 10:24:06 +0200 Subject: [PATCH] fix delays --- changedetectionio/tests/test_ignorehyperlinks.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/changedetectionio/tests/test_ignorehyperlinks.py b/changedetectionio/tests/test_ignorehyperlinks.py index 2b9009bf..34b43a1f 100644 --- a/changedetectionio/tests/test_ignorehyperlinks.py +++ b/changedetectionio/tests/test_ignorehyperlinks.py @@ -3,7 +3,7 @@ import time from flask import url_for -from .util import live_server_setup +from .util import live_server_setup, wait_for_all_checks def test_setup(live_server): @@ -70,19 +70,18 @@ def test_render_anchor_tag_content_true(client, live_server, measure_memory_usag ) assert b"1 Imported" in res.data - time.sleep(sleep_time_for_fetch_thread) + wait_for_all_checks(client) # Trigger a check client.get(url_for("ui.form_watch_checknow"), follow_redirects=True) # set a new html text with a modified link set_modified_ignore_response() - time.sleep(sleep_time_for_fetch_thread) + wait_for_all_checks(client) # Trigger a check client.get(url_for("ui.form_watch_checknow"), follow_redirects=True) - # Give the thread time to pick it up - time.sleep(sleep_time_for_fetch_thread) + wait_for_all_checks(client) # We should not see the rendered anchor tag res = client.get(url_for("ui.ui_views.preview_page", uuid="first")) @@ -104,7 +103,7 @@ def test_render_anchor_tag_content_true(client, live_server, measure_memory_usag client.get(url_for("ui.form_watch_checknow"), follow_redirects=True) # Give the thread time to pick it up - time.sleep(sleep_time_for_fetch_thread) + wait_for_all_checks(client)