Skip to content

Commit 238020f

Browse files
committed
CDRIVER-790 better auth errors from tests
1 parent 2ffb170 commit 238020f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tests/test-libmongoc.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,14 @@ call_ismaster (bson_t *reply)
508508
mongoc_uri_set_option_as_int32 (uri, "serverSelectionTimeoutMS", 1000);
509509

510510
client = mongoc_client_new_from_uri (uri);
511-
ASSERT_OR_PRINT (mongoc_client_command_simple (client, "admin",
512-
tmp_bson ("{'isMaster': 1}"),
513-
NULL, reply, &error),
514-
error);
511+
if (!mongoc_client_command_simple (client, "admin",
512+
tmp_bson ("{'isMaster': 1}"),
513+
NULL, reply, &error)) {
514+
515+
printf ("error calling ismaster: '%s'\n", error.message);
516+
printf ("URI = %s\n", uri_str);
517+
abort ();
518+
}
515519

516520
mongoc_client_destroy (client);
517521
mongoc_uri_destroy (uri);

0 commit comments

Comments
 (0)