Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1b5e820
PYTHON-4763 Migrate test_change_stream.py to async
sleepyStick Sep 11, 2024
8ffec6d
add the async tests
sleepyStick Sep 12, 2024
db5957b
fix the sleeps for async
sleepyStick Sep 12, 2024
581d4fc
import anext
sleepyStick Sep 12, 2024
4b91bcb
fix import
sleepyStick Sep 12, 2024
1a94a92
fix import pt 2
sleepyStick Sep 12, 2024
246a067
attempt to fix errors
sleepyStick Sep 12, 2024
3554857
attempt to fix errors pt2
sleepyStick Sep 12, 2024
20f7dba
attempt to fix errors pt3
sleepyStick Sep 12, 2024
3b0f012
attempt to fix errors pt4
sleepyStick Sep 12, 2024
5aec1ff
attempt to fix errors pt5
sleepyStick Sep 12, 2024
3c38292
fix: its async with await
sleepyStick Sep 12, 2024
f728fee
forgot some awaits
sleepyStick Sep 12, 2024
9981a03
maybe too many awaits?
sleepyStick Sep 12, 2024
5ee726d
left out an async
sleepyStick Sep 12, 2024
d3dc8a6
skip threading tests in async
sleepyStick Sep 12, 2024
0ed7a71
next() needs to be awaited
sleepyStick Sep 12, 2024
82ef463
fix timed out tests
sleepyStick Sep 13, 2024
37e52bd
fix timed out tests pt2
sleepyStick Sep 13, 2024
fa3207c
fix timed out tests pt3
sleepyStick Sep 13, 2024
7d04121
fix timed out tests pt4
sleepyStick Sep 13, 2024
a66219b
fix timed out tests pt5
sleepyStick Sep 13, 2024
04e96b5
fix timed out tests pt6
sleepyStick Sep 13, 2024
3b8c85c
test_concurrent_close should be sync only
sleepyStick Sep 13, 2024
26a01b2
missing awaits
sleepyStick Sep 13, 2024
d3ce4ad
missing awaits and change StopIteration to StopAsyncIteration
sleepyStick Sep 13, 2024
52c81a4
add parens around await
sleepyStick Sep 13, 2024
cd73375
missing awaits pt 3?
sleepyStick Sep 13, 2024
a0d285b
fix _wait_until
sleepyStick Sep 16, 2024
0ad7be2
the new line always wants to be inserted, i will stop fighting it now
sleepyStick Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/test_change_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
from pymongo.synchronous.command_cursor import CommandCursor
from pymongo.write_concern import WriteConcern

_IS_SYNC = True


class TestChangeStreamBase(IntegrationTest):
RUN_ON_LOAD_BALANCER = True
Expand Down Expand Up @@ -310,7 +312,7 @@ def _test_next_blocks(self, change_stream):
@no_type_check
def test_next_blocks(self):
"""Test that next blocks until a change is readable"""
# Use a short await time to speed up the test.
# Use a short time to speed up the test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Use a short time to speed up the test.
# Use a short wait time to speed up the test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed :)

with self.change_stream(max_await_time_ms=250) as change_stream:
self._test_next_blocks(change_stream)

Expand All @@ -325,7 +327,7 @@ def test_aggregate_cursor_blocks(self):
@no_type_check
def test_concurrent_close(self):
"""Ensure a ChangeStream can be closed from another thread."""
# Use a short await time to speed up the test.
# Use a short time to speed up the test.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Use a short time to speed up the test.
# Use a short wait time to speed up the test.

with self.change_stream(max_await_time_ms=250) as change_stream:

def iterate_cursor():
Expand Down
1 change: 1 addition & 0 deletions tools/synchro.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"test_auth.py",
"test_auth_spec.py",
"test_bulk.py",
"test_change_stream.py",
"test_client.py",
"test_client_bulk_write.py",
"test_collection.py",
Expand Down
Loading