(self)
| 1655 | |
| 1656 | @async_client_context.require_replica_set |
| 1657 | async def test_stale_getmore(self): |
| 1658 | # A cursor is created, but its member goes down and is removed from |
| 1659 | # the topology before the getMore message is sent. Test that |
| 1660 | # AsyncMongoClient._run_operation_with_response handles the error. |
| 1661 | with self.assertRaises(AutoReconnect): |
| 1662 | client = await self.async_rs_client(connect=False, serverSelectionTimeoutMS=100) |
| 1663 | await client._run_operation( |
| 1664 | operation=message._GetMore( |
| 1665 | "pymongo_test", |
| 1666 | "collection", |
| 1667 | 101, |
| 1668 | 1234, |
| 1669 | client.codec_options, |
| 1670 | ReadPreference.PRIMARY, |
| 1671 | None, |
| 1672 | client, |
| 1673 | None, |
| 1674 | None, |
| 1675 | False, |
| 1676 | None, |
| 1677 | ), |
| 1678 | unpack_res=AsyncCursor(client.pymongo_test.collection)._unpack_response, |
| 1679 | address=("not-a-member", 27017), |
| 1680 | ) |
| 1681 | |
| 1682 | async def test_heartbeat_frequency_ms(self): |
| 1683 | class HeartbeatStartedListener(ServerHeartbeatListener): |
nothing calls this directly
no test coverage detected