Merge pull request #4293 from pallets/flaky-lazy-test

try to address flakiness of lazy loading test
This commit is contained in:
David Lord 2021-10-05 08:06:49 -07:00 committed by GitHub
commit 5a1c5eb5c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -334,7 +334,9 @@ def test_lazy_load_error(monkeypatch):
lazy = DispatchingApp(bad_load, use_eager_loading=False)
with pytest.raises(BadExc):
lazy._flush_bg_loading_exception()
# reduce flakiness by waiting for the internal loading lock
with lazy._lock:
lazy._flush_bg_loading_exception()
def test_with_appcontext(runner):