@@ -42,7 +42,7 @@ struct DatabaseEntry {
42
42
async fn acquire_connection_and_send_command ( ) {
43
43
let _guard: RwLockReadGuard < ( ) > = LOCK . run_concurrently ( ) . await ;
44
44
45
- let client_options = CLIENT_OPTIONS . clone ( ) ;
45
+ let client_options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
46
46
let mut pool_options = ConnectionPoolOptions :: from_client_options ( & client_options) ;
47
47
pool_options. ready = Some ( true ) ;
48
48
@@ -86,7 +86,7 @@ async fn acquire_connection_and_send_command() {
86
86
async fn concurrent_connections ( ) {
87
87
let _guard = LOCK . run_exclusively ( ) . await ;
88
88
89
- let mut options = CLIENT_OPTIONS . clone ( ) ;
89
+ let mut options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
90
90
if options. load_balanced . unwrap_or ( false ) {
91
91
log_uncaptured ( "skipping concurrent_connections test due to load-balanced topology" ) ;
92
92
return ;
@@ -117,13 +117,13 @@ async fn concurrent_connections() {
117
117
. expect ( "failpoint should succeed" ) ;
118
118
119
119
let handler = Arc :: new ( EventHandler :: new ( ) ) ;
120
- let client_options = CLIENT_OPTIONS . clone ( ) ;
120
+ let client_options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
121
121
let mut options = ConnectionPoolOptions :: from_client_options ( & client_options) ;
122
122
options. cmap_event_handler = Some ( handler. clone ( ) as Arc < dyn crate :: cmap:: CmapEventHandler > ) ;
123
123
options. ready = Some ( true ) ;
124
124
125
125
let pool = ConnectionPool :: new (
126
- CLIENT_OPTIONS . hosts [ 0 ] . clone ( ) ,
126
+ CLIENT_OPTIONS . get ( ) . await . hosts [ 0 ] . clone ( ) ,
127
127
Default :: default ( ) ,
128
128
TopologyUpdater :: channel ( ) . 0 ,
129
129
Some ( options) ,
@@ -174,7 +174,7 @@ async fn concurrent_connections() {
174
174
async fn connection_error_during_establishment ( ) {
175
175
let _guard: RwLockWriteGuard < _ > = LOCK . run_exclusively ( ) . await ;
176
176
177
- let mut client_options = CLIENT_OPTIONS . clone ( ) ;
177
+ let mut client_options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
178
178
if client_options. load_balanced . unwrap_or ( false ) {
179
179
log_uncaptured (
180
180
"skipping connection_error_during_establishment test due to load-balanced topology" ,
@@ -235,7 +235,7 @@ async fn connection_error_during_establishment() {
235
235
async fn connection_error_during_operation ( ) {
236
236
let _guard: RwLockWriteGuard < _ > = LOCK . run_exclusively ( ) . await ;
237
237
238
- let mut options = CLIENT_OPTIONS . clone ( ) ;
238
+ let mut options = CLIENT_OPTIONS . get ( ) . await . clone ( ) ;
239
239
let handler = Arc :: new ( EventHandler :: new ( ) ) ;
240
240
options. cmap_event_handler = Some ( handler. clone ( ) as Arc < dyn CmapEventHandler > ) ;
241
241
options. hosts . drain ( 1 ..) ;
0 commit comments