CXX-3208 update SDAM monitoring tests following mongo-c-driver a91d6f6a #1332
+16
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup to #1331 which overlooked an update to SDAM Monitoring behavior as part of CDRIVER-3775:
Specifically due to mongodb/mongo-c-driver#1842, which included the following change(s):
This PR proposes simply ignoring the Unknown topology description state during the "Topology Events" assertions, as AFAIK there is not a deterministic way to know in advance that a particular TopologyDescriptionChanged event is specifically due to server monitoring shutdown without significant refactoring of the SDAM Monitoring test case (e.g. we likely do not want to hardcode assumptions about the number of members in the replica set).
The Catch2 v3
CHECKED_IF
macro is used for improved test debugging experience and verify runtime behavior (example output is paraphrased to reduce verbosity):AFAICT this is the first use of the Catch2 v3
CHECKED_IF
macro in the test suite. It was present in Catch2 v2, but negative conditions were treated as an assertion failure rather than simply a recorded result.No other changes appear to be necessary.