Skip to content

Commit a95f89a

Browse files
committed
CXX-897 Account for SERVER-22041 changes in test
1 parent ea3978a commit a95f89a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mongo/integration/standalone/dbclient_test.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,12 @@ TEST_F(DBClientTest, CountWithHint) {
10511051
ASSERT_NO_THROW(c->count(TEST_NS, bad));
10521052
}
10531053

1054-
ASSERT_EQUALS(c->count(TEST_NS, Query().hint("b_1")), 2U);
1054+
// In 3.3, the behavior here changed, see SERVER-22041 for details.
1055+
if (serverGTE(c.get(), 3, 3)) {
1056+
ASSERT_EQUALS(c->count(TEST_NS, Query().hint("b_1")), 0U);
1057+
} else {
1058+
ASSERT_EQUALS(c->count(TEST_NS, Query().hint("b_1")), 2U);
1059+
}
10551060
}
10561061

10571062
TEST_F(DBClientTest, CopyDatabaseNoAuth) {

0 commit comments

Comments
 (0)