Skip to content

Commit 4951769

Browse files
authored
RUST-2187 Test stable API on sharded clusters (#1425)
1 parent fea0fc7 commit 4951769

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.evergreen/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ buildvariants:
199199
# Configuring SSL: ssl causes errors in bootstrap mongo-orchestration.
200200
tasks:
201201
# The Stable API was introduced in MongoDB version 5.0. Drivers Evergreen Tools only supports
202-
# setting REQUIRE_API_VERSION on standalones.
202+
# setting REQUIRE_API_VERSION on standalones and sharded clusters.
203203
- .standalone !.4.0 !.4.2 !.4.4
204+
- .sharded !.4.0 !.4.2 !.4.4
204205

205206
- name: sync-api
206207
display_name: "Sync API"

src/test/documentation_examples.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,16 +1684,9 @@ async fn convenient_transaction_examples() -> Result<()> {
16841684
return Ok(());
16851685
}
16861686

1687-
let uri = DEFAULT_URI.clone();
1687+
let client = Client::for_test().await;
16881688
// Start Transactions withTxn API Example 1
16891689

1690-
// For a replica set, include the replica set name and a seedlist of the members in the URI
1691-
// string; e.g. let uri = "mongodb://mongodb0.example.com:27017,mongodb1.example.com:27017/?
1692-
// replicaSet=myRepl"; For a sharded cluster, connect to the mongos instances; e.g.
1693-
// let uri = "mongodb://mongos0.example.com:27017,mongos1.example.com:27017/";
1694-
1695-
let client = Client::with_uri_str(uri).await?;
1696-
16971690
// Prereq: Create collections. CRUD operations in transactions must be on existing collections.
16981691

16991692
client

0 commit comments

Comments
 (0)