Skip to content

Commit 4340881

Browse files
committed
Change timeout in test clients.
1 parent 5607a29 commit 4340881

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/test-libmongoc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ call_ismaster (bson_t *reply)
502502
uri_str = test_framework_get_uri_str_from_env ();
503503
uri = mongoc_uri_new (uri_str);
504504
assert (uri);
505+
mongoc_uri_set_option_as_int32 (uri, "connectTimeoutMS", 1000);
505506
mongoc_uri_set_option_as_int32 (uri, "serverSelectionTimeoutMS", 1000);
506507

507508
client = mongoc_client_new_from_uri (uri);
@@ -605,9 +606,6 @@ test_framework_get_uri_str_no_auth (const char *database_name)
605606
}
606607

607608
/* by now the string ends in "?" or "&", we can add options to it */
608-
bson_string_append (uri_string,
609-
"connectTimeoutMS=1000&serverSelectionTimeoutMS=1000");
610-
611609
if (test_framework_get_ssl ()) {
612610
bson_string_append (uri_string, "&ssl=true");
613611
}

0 commit comments

Comments
 (0)