Skip to content

Commit a021ada

Browse files
committed
CDRIVER-1702 don't fail when returned platform is truncated
1 parent 7d1562b commit a021ada

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test-mongoc-handshake.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ test_mongoc_handshake_data_append_success (void)
257257
ASSERT (BSON_ITER_HOLDS_UTF8 (&md_iter));
258258
val = bson_iter_utf8 (&md_iter, NULL);
259259
ASSERT (val);
260-
ASSERT (strstr (val, platform) != NULL);
260+
if (strlen(val) < 250) { /* standard val are < 100, may be truncated on some platform */
261+
ASSERT (strstr (val, platform) != NULL);
262+
}
261263

262264
mock_server_replies_simple (request,
263265
"{'ok': 1, 'ismaster': true}");

0 commit comments

Comments
 (0)