Skip to content

Commit 16ca2b6

Browse files
remove old v2 runner
1 parent 3ddd5de commit 16ca2b6

File tree

16 files changed

+37
-1378
lines changed

16 files changed

+37
-1378
lines changed

src/test/mod.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,7 @@ mod spec;
1010
mod util;
1111

1212
pub(crate) use self::{
13-
spec::{
14-
run_spec_test,
15-
run_v2_test,
16-
AnyTestOperation,
17-
OperationObject,
18-
RunOn,
19-
TestEvent,
20-
Topology,
21-
},
13+
spec::{run_spec_test, RunOn, Topology},
2214
util::{
2315
assert_matches,
2416
CmapEvent,

src/test/spec/crud_v2.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use tokio::sync::RwLockWriteGuard;
22

3-
use crate::test::{run_spec_test, run_v2_test, LOCK};
3+
use crate::test::{run_spec_test, LOCK};
4+
5+
use super::run_v2_test;
46

57
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
68
#[cfg_attr(feature = "async-std-runtime", async_std::test)]

src/test/spec/mod.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ mod ocsp;
1111
mod read_write_concern;
1212
mod retryable_reads;
1313
mod retryable_writes;
14-
mod runner;
1514
mod sessions;
1615
mod unified_runner;
16+
mod v2_runner;
1717

1818
use std::{
1919
convert::TryFrom,
@@ -24,16 +24,8 @@ use std::{
2424
};
2525

2626
pub use self::{
27-
runner::{
28-
run_v2_test,
29-
AnyTestOperation,
30-
OperationObject,
31-
RunOn,
32-
TestData,
33-
TestEvent,
34-
TestFile,
35-
},
3627
unified_runner::Topology,
28+
v2_runner::{operation::Operation, run_v2_test, test_file::RunOn},
3729
};
3830

3931
use serde::de::DeserializeOwned;

src/test/spec/retryable_reads.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use tokio::sync::RwLockWriteGuard;
22

3-
use crate::test::{run_spec_test, run_v2_test, LOCK};
3+
use crate::test::{run_spec_test, LOCK};
4+
5+
use super::run_v2_test;
46

57
#[cfg_attr(feature = "tokio-runtime", tokio::test(flavor = "multi_thread"))]
68
#[cfg_attr(feature = "async-std-runtime", async_std::test)]

src/test/spec/retryable_writes/mod.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,10 @@ async fn run_spec_tests() {
8181
.unwrap();
8282
}
8383

84-
let result = client
85-
.run_collection_operation(
86-
&test_case.operation,
87-
&db_name,
88-
&coll_name,
89-
Some(options.clone()),
90-
)
91-
.await;
84+
let coll = client
85+
.database(&db_name)
86+
.collection_with_options(&coll_name, options.clone());
87+
let result = test_case.operation.execute_on_collection(&coll, None).await;
9288

9389
if let Some(error) = test_case.outcome.error {
9490
assert_eq!(

src/test/spec/retryable_writes/test_file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use serde::Deserialize;
22

3-
use super::super::{AnyTestOperation, RunOn};
3+
use super::super::{Operation, RunOn};
44
use crate::{
55
bson::{Bson, Document},
66
options::ClientOptions,
@@ -21,7 +21,7 @@ pub struct TestCase {
2121
pub client_options: Option<ClientOptions>,
2222
pub use_multiple_mongoses: Option<bool>,
2323
pub fail_point: Option<Document>,
24-
pub operation: AnyTestOperation,
24+
pub operation: Operation,
2525
pub outcome: Outcome,
2626
}
2727

src/test/spec/runner/mod.rs

Lines changed: 0 additions & 223 deletions
This file was deleted.

0 commit comments

Comments
 (0)