Skip to content

Commit 678bc6a

Browse files
committed
Fix expectations on windows
1 parent c86e5d2 commit 678bc6a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test-mongoc-async.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "mongoc-tests.h"
66
#include "TestSuite.h"
77
#include "mock_server/mock-server.h"
8+
#include "mongoc-errno-private.h"
89

910
#undef MONGOC_LOG_DOMAIN
1011
#define MONGOC_LOG_DOMAIN "async-test"
@@ -59,6 +60,7 @@ test_ismaster_impl (bool with_ssl)
5960
struct result results[NSERVERS];
6061
int r;
6162
int i;
63+
int errcode;
6264
bson_t q = BSON_INITIALIZER;
6365

6466
#ifdef MONGOC_ENABLE_SSL
@@ -98,8 +100,10 @@ test_ismaster_impl (bool with_ssl)
98100
sizeof (server_addr),
99101
0);
100102

101-
if (!(r == 0 || errno == EAGAIN || errno == EINPROGRESS)) {
102-
fprintf (stderr, "mongoc_socket_connect unexpected return: %d\n", r);
103+
errcode = mongoc_socket_errno (conn_sock);
104+
if (!(r == 0 || MONGOC_ERRNO_IS_AGAIN (errcode))) {
105+
fprintf (stderr, "mongoc_socket_connect unexpected return: "
106+
"%d (errno: %d)\n", r, errcode);
103107
fflush (stderr);
104108
abort ();
105109
}

0 commit comments

Comments
 (0)