-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-4763 Migrate test_change_stream.py to async #1853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,274
−21
Merged
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 8ffec6d
add the async tests
sleepyStick db5957b
fix the sleeps for async
sleepyStick 581d4fc
import anext
sleepyStick 4b91bcb
fix import
sleepyStick 1a94a92
fix import pt 2
sleepyStick 246a067
attempt to fix errors
sleepyStick 3554857
attempt to fix errors pt2
sleepyStick 20f7dba
attempt to fix errors pt3
sleepyStick 3b0f012
attempt to fix errors pt4
sleepyStick 5aec1ff
attempt to fix errors pt5
sleepyStick 3c38292
fix: its async with await
sleepyStick f728fee
forgot some awaits
sleepyStick 9981a03
maybe too many awaits?
sleepyStick 5ee726d
left out an async
sleepyStick d3dc8a6
skip threading tests in async
sleepyStick 0ed7a71
next() needs to be awaited
sleepyStick 82ef463
fix timed out tests
sleepyStick 37e52bd
fix timed out tests pt2
sleepyStick fa3207c
fix timed out tests pt3
sleepyStick 7d04121
fix timed out tests pt4
sleepyStick a66219b
fix timed out tests pt5
sleepyStick 04e96b5
fix timed out tests pt6
sleepyStick 3b8c85c
test_concurrent_close should be sync only
sleepyStick 26a01b2
missing awaits
sleepyStick d3ce4ad
missing awaits and change StopIteration to StopAsyncIteration
sleepyStick 52c81a4
add parens around await
sleepyStick cd73375
missing awaits pt 3?
sleepyStick a0d285b
fix _wait_until
sleepyStick 0ad7be2
the new line always wants to be inserted, i will stop fighting it now
sleepyStick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 | ||||||
|
@@ -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. | ||||||
with self.change_stream(max_await_time_ms=250) as change_stream: | ||||||
self._test_next_blocks(change_stream) | ||||||
|
||||||
|
@@ -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. | ||||||
|
# Use a short time to speed up the test. | |
# Use a short wait time to speed up the test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed :)