Skip to content

Commit 975ae7f

Browse files
Update index test case for forward-compatibility with server 8.3 (#1455)
Cherry-pick c39093a to fix failing tests on latest servers. Revert `server_version_is_at_least` to older name: `newer_than`. --------- Co-authored-by: Ezra Chung <[email protected]>
1 parent 0711449 commit 975ae7f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mongocxx/test/index_view.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,10 @@ TEST_CASE("drop_one", "[index_view]") {
370370
auto cursor = indexes.list();
371371
REQUIRE(std::distance(cursor.begin(), cursor.end()) == 1);
372372

373-
REQUIRE_THROWS_AS(indexes.drop_one("foo"), operation_exception);
373+
// SERVER-90152: "dropIndex should be idempotent"
374+
if (!test_util::newer_than("8.3")) {
375+
REQUIRE_THROWS_AS(indexes.drop_one("foo"), operation_exception);
376+
}
374377
}
375378
}
376379

0 commit comments

Comments
 (0)