@@ -825,20 +825,29 @@ async def test_init_disconnected(self):
825825 topology_description .server_descriptions (),
826826 {(host , port ): ServerDescription ((host , port ))},
827827 )
828+
828829 # address causes client to block until connected
829830 self .assertIsNotNone (await c .address )
831+ # Initial seed topology and connected topology have the same ID
832+ self .assertEqual (
833+ c ._topology ._topology_id , topology_description ._topology_settings ._topology_id
834+ )
835+
830836 c = await self .async_rs_or_single_client (connect = False )
831837 # primary causes client to block until connected
832838 await c .primary
833839 self .assertIsNotNone (c ._topology )
840+
834841 c = await self .async_rs_or_single_client (connect = False )
835842 # secondaries causes client to block until connected
836843 await c .secondaries
837844 self .assertIsNotNone (c ._topology )
845+
838846 c = await self .async_rs_or_single_client (connect = False )
839847 # arbiters causes client to block until connected
840848 await c .arbiters
841849 self .assertIsNotNone (c ._topology )
850+
842851 c = await self .async_rs_or_single_client (connect = False )
843852 # is_primary causes client to block until connected
844853 self .assertIsInstance (await c .is_primary , bool )
@@ -2194,18 +2203,6 @@ async def test_uuid_queries(self):
21942203 self .assertEqual (2 , len (docs ))
21952204 await coll .drop ()
21962205
2197- async def test_unconnected_client_properties_with_srv (self ):
2198- client = self .simple_client ("mongodb+srv://test1.test.build.10gen.cc/" , connect = False )
2199- self .assertEqual (client .nodes , frozenset ())
2200- topology_description = client .topology_description
2201- self .assertEqual (topology_description .topology_type , TOPOLOGY_TYPE .Unknown )
2202- self .assertEqual (
2203- topology_description .server_descriptions (),
2204- {("unknown" , None ): ServerDescription (("unknown" , None ))},
2205- )
2206- await client .aconnect ()
2207- self .assertEqual (await client .address , None )
2208-
22092206
22102207class TestExhaustCursor (AsyncIntegrationTest ):
22112208 """Test that clients properly handle errors from exhaust cursors."""
0 commit comments