-
Notifications
You must be signed in to change notification settings - Fork 244
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
DRIVERS-2914: Don't create output collection in aggregate tests #1660
Conversation
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 the Ruby driver updated tests pass on 8.0 without errors - https://spruce.mongodb.com/version/66eab322e30a8a0007f1b4b8/tasks
@@ -78,12 +75,6 @@ tests: | |||
$readPreference: *readPreference | |||
readConcern: *readConcern | |||
writeConcern: *writeConcern | |||
outcome: &outcome |
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.
Was it also necessary to remove the outcome
assertions? I didn't see that mentioned in DRIVERS-2914 (only initialData
), and you didn't remove this assertion from db-aggregate-write-readPreference.yml
below.
I'll concede that this isn't essential to the test. The commandStartedEvent
assertions for $readPreference
is the most relevant bit.
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.
I've ran into issues where the outcome assertion failed with no documents being found, but they were there when I checked. Step-debugging and introducing a tiny delay fixed the issue, so I decided to remove that element of flakiness from the test, as the real test is the assertion for $readPreference
, and we're testing server behaviour beyond that.
Not removing the assertion from db-aggregate-write-readPreference
was an oversight and I've now removed it from that test as well for consistency.
4dce4d1
to
ea20e34
Compare
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 (test pass locally on node!)
…1664) generate aggregate-write-readPreference.json
…odb#1660) * DRIVERS-2914: Don't create output collection in aggregate tests * Remove outcome assertion
…#1660) (mongodb#1664) generate aggregate-write-readPreference.json
This PR fixes errors when running the aggregate-write-readPreference tests on MongoDB 8.0. The error can be avoided by not creating the output collection during test setup. In addition, I removed the outcome assertions as the tests were flaky on sharded clusters; sometimes the query run to validate the outcome would yield no results, while they were available a split-second later. Tests were run using PHP, and I'd like @comandeo-mongo to confirm the changes fix the failures that Ruby is experiencing.
Please complete the following before merging:
clusters, and serverless).