diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-08-02 21:23:23 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-08-02 22:07:37 +0200 |
commit | f3e2a465df442ce22929edf0aaf9c1dde2bb63c7 (patch) | |
tree | 978f56af7d28d7fa90f8b579a30ca510c87610f3 /tests | |
parent | 2b89bec8ab0b6fecd9484713f565a7557c50842e (diff) | |
download | fietsboek-f3e2a465df442ce22929edf0aaf9c1dde2bb63c7.tar.gz fietsboek-f3e2a465df442ce22929edf0aaf9c1dde2bb63c7.tar.bz2 fietsboek-f3e2a465df442ce22929edf0aaf9c1dde2bb63c7.zip |
make tileproxy test less flaky
Diffstat (limited to 'tests')
-rw-r--r-- | tests/playwright/test_tileproxy.py | 7 |
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 |