Skip to content

Commit fee5f26

Browse files
committed
Move comment
1 parent 23253b1 commit fee5f26

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/test/spec/retryable_reads.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ async fn retry_read_different_mongos() {
173173
return;
174174
}
175175

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+
176185
// NOTE: This test places all failpoints on a single mongos server to avoid flakiness caused by
177186
// incomplete server discovery.
178187
//
@@ -185,15 +194,6 @@ async fn retry_read_different_mongos() {
185194
// but the driver was unaware of its existence. By placing all failpoints on a single mongos
186195
// host, we ensure that server selection and retries happen within a single fully discovered
187196
// 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-
197197
let mut guards = Vec::new();
198198
for address in hosts {
199199
let address = address.clone();

0 commit comments

Comments
 (0)