Skip to content

Commit e6fa2b2

Browse files
committed
Fix 5.0 test
1 parent 6b364fa commit e6fa2b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libmongoc/tests/test-mongoc-sdam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ test_direct_connection (void *ctx)
596596
BSON_APPEND_UTF8 (&doc, "hello", "world");
597597
r = mongoc_collection_insert_one (collection, &doc, NULL, &reply, &error);
598598
ASSERT_OR_PRINT (!r, error);
599-
ASSERT (strstr (error.message, "not master"));
599+
ASSERT (strstr (error.message, "not master") || strstr (error.message, "not primary"));
600600

601601
bson_destroy (&reply);
602602
bson_destroy (&doc);
@@ -660,7 +660,7 @@ test_existing_behavior (void *ctx)
660660
BSON_APPEND_UTF8 (&doc, "hello", "world");
661661
r = mongoc_collection_insert_one (collection, &doc, NULL, &reply, &error);
662662
ASSERT_OR_PRINT (!r, error);
663-
ASSERT (strstr (error.message, "not master"));
663+
ASSERT (strstr (error.message, "not master") || strstr (error.message, "not primary"));
664664

665665
bson_destroy (&reply);
666666
bson_destroy (&doc);

0 commit comments

Comments
 (0)