@@ -825,20 +825,29 @@ async def test_init_disconnected(self):
825
825
topology_description .server_descriptions (),
826
826
{(host , port ): ServerDescription ((host , port ))},
827
827
)
828
+
828
829
# address causes client to block until connected
829
830
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
+
830
836
c = await self .async_rs_or_single_client (connect = False )
831
837
# primary causes client to block until connected
832
838
await c .primary
833
839
self .assertIsNotNone (c ._topology )
840
+
834
841
c = await self .async_rs_or_single_client (connect = False )
835
842
# secondaries causes client to block until connected
836
843
await c .secondaries
837
844
self .assertIsNotNone (c ._topology )
845
+
838
846
c = await self .async_rs_or_single_client (connect = False )
839
847
# arbiters causes client to block until connected
840
848
await c .arbiters
841
849
self .assertIsNotNone (c ._topology )
850
+
842
851
c = await self .async_rs_or_single_client (connect = False )
843
852
# is_primary causes client to block until connected
844
853
self .assertIsInstance (await c .is_primary , bool )
@@ -2194,18 +2203,6 @@ async def test_uuid_queries(self):
2194
2203
self .assertEqual (2 , len (docs ))
2195
2204
await coll .drop ()
2196
2205
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
-
2209
2206
2210
2207
class TestExhaustCursor (AsyncIntegrationTest ):
2211
2208
"""Test that clients properly handle errors from exhaust cursors."""
0 commit comments