PYTHON-3478 Improve test_change_stream_can_resume_after_timeouts (#1083)

This commit is contained in:
Shane Harvey 2022-10-19 15:14:46 -07:00 committed by GitHub
parent 1d117c1f39
commit 614e22c46c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,10 +76,10 @@ class TestCSOT(IntegrationTest):
@client_context.require_change_streams
def test_change_stream_can_resume_after_timeouts(self):
coll = self.db.test
with coll.watch(max_await_time_ms=150) as stream:
with coll.watch() as stream:
with pymongo.timeout(0.1):
with self.assertRaises(PyMongoError) as ctx:
stream.try_next()
stream.next()
self.assertTrue(ctx.exception.timeout)
self.assertTrue(stream.alive)
with self.assertRaises(PyMongoError) as ctx: