-
Notifications
You must be signed in to change notification settings - Fork 549
CXX-2342 add serviceid to events #823
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
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
Codecov Report
@@ Coverage Diff @@
## master #823 +/- ##
==========================================
- Coverage 91.31% 91.28% -0.03%
==========================================
Files 381 381
Lines 22028 22095 +67
==========================================
+ Hits 20114 20170 +56
- Misses 1914 1925 +11
Continue to review full report at Codecov.
|
6084aed to
cf76bfc
Compare
cf76bfc to
869a39c
Compare
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
869a39c to
54abd15
Compare
52a76ab to
4f27798
Compare
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
4f27798 to
0bc1ae5
Compare
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
src/mongocxx/test/database.cpp
Outdated
| apm_opts.on_command_failed( | ||
| check_service_id<mongocxx::events::command_failed_event>{expect_service_id}); | ||
|
|
||
| // Set up mocking for mongoc_apm_command_started_get_service_id: |
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.
This applies to all three events. I suggest removing this comment since the comments on L544 and L560 note that mocks are being set.
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.
Given the high level of confusion that's possible for new-to-the-test-framework folks, I would prefer to leave these here. I agree it's somewhat redundant once it's clear what's going on, but like many other things in this test I think a bit of clarification might very well help the next reader, or one less familiar with the test harnesses. (Although if other reviewers are of the same opinion, I don't have super strong feelings about it.)
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 the comment SGTM. It currently only notes mongoc_apm_command_started_get_service_id being mocked. Since mongoc_apm_command_succeeded_get_service_id and mongoc_apm_command_failed_get_service_id are also mocked, should this be edited to note all three?
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.
Ah! I see what you're saying! I've gone ahead and revised the comment. Derp!
kevinAlbs
left a comment
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 with some comment tweaks! Since this is a non-trivial change, can you request review from another team member?
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
Signed-off-by: Jesse Williamson <jesse.williamson@mongodb.com>
vector-of-bool
left a comment
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
Add serviceId to CommandFailedEvent, CommandSucceededEvent, and CommandStartedEvent
https://jira.mongodb.org/browse/CXX-2342
Part of CXX-2173 LoadBalancer epic.
Signed-off-by: Jesse Williamson jesse.williamson@mongodb.com