File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,15 @@ async fn retry_read_different_mongos() {
173
173
return ;
174
174
}
175
175
176
+ client_options. hosts . drain ( 2 ..) ;
177
+ client_options. retry_reads = Some ( true ) ;
178
+
179
+ let hosts = client_options. hosts . clone ( ) ;
180
+ let client = Client :: for_test ( )
181
+ . options ( client_options)
182
+ . monitor_events ( )
183
+ . await ;
184
+
176
185
// NOTE: This test places all failpoints on a single mongos server to avoid flakiness caused by
177
186
// incomplete server discovery.
178
187
//
@@ -185,15 +194,6 @@ async fn retry_read_different_mongos() {
185
194
// but the driver was unaware of its existence. By placing all failpoints on a single mongos
186
195
// host, we ensure that server selection and retries happen within a single fully discovered
187
196
// router, avoiding issues caused by prematurely filtered or undiscovered servers.
188
- client_options. hosts . drain ( 2 ..) ;
189
- client_options. retry_reads = Some ( true ) ;
190
-
191
- let hosts = client_options. hosts . clone ( ) ;
192
- let client = Client :: for_test ( )
193
- . options ( client_options)
194
- . monitor_events ( )
195
- . await ;
196
-
197
197
let mut guards = Vec :: new ( ) ;
198
198
for address in hosts {
199
199
let address = address. clone ( ) ;
You can’t perform that action at this time.
0 commit comments