Skip to content

Commit 52c513d

Browse files
authored
RUST-412 Use sort when verifying the outcome of CRUD v1 tests (#732)
1 parent 2c6416d commit 52c513d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/test/spec/crud_v1/mod.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ use std::future::Future;
1818
use futures::stream::TryStreamExt;
1919
use serde::Deserialize;
2020

21-
use crate::{bson::Document, test::log_uncaptured, Collection};
21+
use crate::{
22+
bson::{doc, Document},
23+
coll::options::FindOptions,
24+
test::log_uncaptured,
25+
Collection,
26+
};
2227

2328
use super::{run_spec_test, Serverless};
2429

@@ -58,7 +63,8 @@ pub struct CollectionOutcome {
5863
}
5964

6065
pub async fn find_all(coll: &Collection<Document>) -> Vec<Document> {
61-
coll.find(None, None)
66+
let options = FindOptions::builder().sort(doc! { "_id": 1 }).build();
67+
coll.find(None, options)
6268
.await
6369
.unwrap()
6470
.try_collect()

0 commit comments

Comments
 (0)