aboutsummaryrefslogtreecommitdiff
path: root/tests/playwright
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-08-02 21:23:23 +0200
committerDaniel Schadt <kingdread@gmx.de>2023-08-02 22:07:37 +0200
commitf3e2a465df442ce22929edf0aaf9c1dde2bb63c7 (patch)
tree978f56af7d28d7fa90f8b579a30ca510c87610f3 /tests/playwright
parent2b89bec8ab0b6fecd9484713f565a7557c50842e (diff)
downloadfietsboek-f3e2a465df442ce22929edf0aaf9c1dde2bb63c7.tar.gz
fietsboek-f3e2a465df442ce22929edf0aaf9c1dde2bb63c7.tar.bz2
fietsboek-f3e2a465df442ce22929edf0aaf9c1dde2bb63c7.zip
make tileproxy test less flaky
Diffstat (limited to 'tests/playwright')
-rw-r--r--tests/playwright/test_tileproxy.py7
1 files changed, 7 insertions, 0 deletions
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