@@ -42,7 +42,7 @@ struct DatabaseEntry {
4242async fn acquire_connection_and_send_command ( ) {
4343 let _guard: RwLockReadGuard < ( ) > = LOCK . run_concurrently ( ) . await ;
4444
45- let client_options = CLIENT_OPTIONS . clone ( ) ;
45+ let client_options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
4646 let mut pool_options = ConnectionPoolOptions :: from_client_options ( & client_options) ;
4747 pool_options. ready = Some ( true ) ;
4848
@@ -86,7 +86,7 @@ async fn acquire_connection_and_send_command() {
8686async fn concurrent_connections ( ) {
8787 let _guard = LOCK . run_exclusively ( ) . await ;
8888
89- let mut options = CLIENT_OPTIONS . clone ( ) ;
89+ let mut options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
9090 if options. load_balanced . unwrap_or ( false ) {
9191 log_uncaptured ( "skipping concurrent_connections test due to load-balanced topology" ) ;
9292 return ;
@@ -117,13 +117,13 @@ async fn concurrent_connections() {
117117 . expect ( "failpoint should succeed" ) ;
118118
119119 let handler = Arc :: new ( EventHandler :: new ( ) ) ;
120- let client_options = CLIENT_OPTIONS . clone ( ) ;
120+ let client_options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
121121 let mut options = ConnectionPoolOptions :: from_client_options ( & client_options) ;
122122 options. cmap_event_handler = Some ( handler. clone ( ) as Arc < dyn crate :: cmap:: CmapEventHandler > ) ;
123123 options. ready = Some ( true ) ;
124124
125125 let pool = ConnectionPool :: new (
126- CLIENT_OPTIONS . hosts [ 0 ] . clone ( ) ,
126+ CLIENT_OPTIONS . get ( ) . await . hosts [ 0 ] . clone ( ) ,
127127 Default :: default ( ) ,
128128 TopologyUpdater :: channel ( ) . 0 ,
129129 Some ( options) ,
@@ -174,7 +174,7 @@ async fn concurrent_connections() {
174174async fn connection_error_during_establishment ( ) {
175175 let _guard: RwLockWriteGuard < _ > = LOCK . run_exclusively ( ) . await ;
176176
177- let mut client_options = CLIENT_OPTIONS . clone ( ) ;
177+ let mut client_options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
178178 if client_options. load_balanced . unwrap_or ( false ) {
179179 log_uncaptured (
180180 "skipping connection_error_during_establishment test due to load-balanced topology" ,
@@ -235,7 +235,7 @@ async fn connection_error_during_establishment() {
235235async fn connection_error_during_operation ( ) {
236236 let _guard: RwLockWriteGuard < _ > = LOCK . run_exclusively ( ) . await ;
237237
238- let mut options = CLIENT_OPTIONS . clone ( ) ;
238+ let mut options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
239239 let handler = Arc :: new ( EventHandler :: new ( ) ) ;
240240 options. cmap_event_handler = Some ( handler. clone ( ) as Arc < dyn CmapEventHandler > ) ;
241241 options. hosts . drain ( 1 ..) ;
0 commit comments