Skip to content

Commit

Permalink
temporary workaround to test_collection_count_documents_timeout failures
Browse files Browse the repository at this point in the history
  • Loading branch information
hemidactylus committed Apr 11, 2024
1 parent 9b8e571 commit 759db84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/idiomatic/integration/test_timeout_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def test_collection_count_documents_timeout_async(
) -> None:
await async_empty_collection.insert_many([{"a": 1}] * 100)
await asyncio.sleep(10)
assert await async_empty_collection.count_documents({}, upper_bound=150) == 100
assert await async_empty_collection.count_documents({}, upper_bound=150) >= 100

with pytest.raises(DataAPITimeoutException) as exc:
await async_empty_collection.count_documents(
Expand Down
2 changes: 1 addition & 1 deletion tests/idiomatic/integration/test_timeout_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_collection_count_documents_timeout_sync(
) -> None:
sync_empty_collection.insert_many([{"a": 1}] * 100)
time.sleep(10)
assert sync_empty_collection.count_documents({}, upper_bound=150) == 100
assert sync_empty_collection.count_documents({}, upper_bound=150) >= 100

with pytest.raises(DataAPITimeoutException) as exc:
sync_empty_collection.count_documents({}, upper_bound=150, max_time_ms=1)
Expand Down

0 comments on commit 759db84

Please sign in to comment.