From f3e2a465df442ce22929edf0aaf9c1dde2bb63c7 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 2 Aug 2023 21:23:23 +0200 Subject: make tileproxy test less flaky --- tests/playwright/test_tileproxy.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/playwright') diff --git a/tests/playwright/test_tileproxy.py b/tests/playwright/test_tileproxy.py index bf1146b..d4d3389 100644 --- a/tests/playwright/test_tileproxy.py +++ b/tests/playwright/test_tileproxy.py @@ -1,3 +1,5 @@ +import time + from playwright.sync_api import Page @@ -10,4 +12,9 @@ def test_tileproxy(page: Page, playwright_helper, caplog): with page.expect_request("/tile/test/**"): pass + # If we're too fast, the log entry might not be there yet, wait 2 more + # seconds + if "Skipping tile proxy request for testing URL" not in caplog.messages: + time.sleep(2) + assert "Skipping tile proxy request for testing URL" in caplog.messages -- cgit v1.2.3