From cdb5df8d87ff610a07e1e3d4acd04cdae027effd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Wed, 28 Feb 2024 12:29:29 +0100 Subject: [PATCH] Fix flaky invalid URI snapshot test (#3704) * Give file system some time clean up temporary snapshot files * Be more careful with test_snapshot_operations_non_wait test * Remove sleep --- tests/openapi/openapi_integration/test_snapshot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/openapi/openapi_integration/test_snapshot.py b/tests/openapi/openapi_integration/test_snapshot.py index 9fa2e7034a..4c83b421ad 100644 --- a/tests/openapi/openapi_integration/test_snapshot.py +++ b/tests/openapi/openapi_integration/test_snapshot.py @@ -11,8 +11,8 @@ collection_name = 'test_collection_snapshot' @pytest.fixture(autouse=True) def setup(on_disk_vectors): basic_collection_setup(collection_name=collection_name, on_disk_vectors=on_disk_vectors) - drop_snapshots(collection_name) yield + drop_snapshots(collection_name) drop_collection(collection_name=collection_name) @@ -205,7 +205,7 @@ def test_full_snapshot_operations(): assert len(response.json()['result']) == 0 -@pytest.mark.timeout(20) +@pytest.mark.timeout(30) def test_snapshot_operations_non_wait(): # there no snapshot on collection response = request_with_validation( @@ -269,7 +269,7 @@ def test_snapshot_operations_non_wait(): sleep(0.1) continue - # no full snapshot + # do full snapshot response = request_with_validation( api='/snapshots', method="GET",