-
Notifications
You must be signed in to change notification settings - Fork 455
Remove unknown fields in isMaster cmd #755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -235,6 +235,7 @@ test_large_ismaster_helper (mongoc_async_cmd_t *acmd, | |||
} | |||
ASSERT_CMPINT (result, ==, MONGOC_ASYNC_CMD_SUCCESS); | |||
|
|||
ASSERT_HAS_FIELD(bson, "ismaster"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this here since previously we didn't print the BSON object if the line below failed.
_test_request_scan_on_error ( | ||
1, | ||
"{'ok': 1, 'writeConcernError': { 'errmsg': 'not master' }}", | ||
1, | ||
1, | ||
"not master"); | ||
_test_request_scan_on_error ( | ||
0, | ||
"{'ok': 1, 'writeConcernError': { 'errmsg': 'not master' }}", | ||
1, | ||
1, | ||
"not master"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This commit fixes the failing /Async/ismaster tests in evergreen.
Because of SERVER-53150, the latest server versions fail on isMaster commands with unknown fields. Previously this test inflatted the isMaster to >1MB to address the issue in CDRIVER-2483 by adding random-ish fields. Rather than sending an unknown field, this fix adds a >1MB comment.