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-2577: add a runCommand specification #1389
Conversation
172aa47
to
9d426c2
Compare
967382e
to
474833d
Compare
fb87726
to
95900ac
Compare
95900ac
to
50fdf4b
Compare
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
arguments: | ||
client: *client | ||
failPoint: | ||
configureFailPoint: failCommand |
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.
You'll need to add useMultipleMongoses: true
in the client entity definition to avoid flaky test failures.
Per failPoint in the Unified Test Format spec:
The client entity SHOULD specify false for useMultipleMongoses if this operation could be executed on a sharded topology (according to runOnRequirements or test.runOnRequirements). This is advised because server selection rules for mongos could lead to unpredictable behavior if different servers were selected for configuring the fail point and executing subsequent operations.
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 think you meant to say set it to false, per the spec right? changed 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.
Oy, typo on my part. Yes, I meant useMultipleMongoses: false
.
- topologies: [ replicaset, sharded-replicaset, load-balanced, sharded ] | ||
minServerVersion: '4.4' |
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.
- topologies: [ replicaset, sharded-replicaset, load-balanced, sharded ] | |
minServerVersion: '4.4' | |
- minServerVersion: "4.0" | |
topologies: [ replicaset ] | |
- minServerVersion: "4.2" | |
topologies: [ sharded-replicaset, load-balanced ] |
Not sure why minServerVersion: 4.4
was used, but other transaction tests allow 4.0+ replica sets and 4.2+ sharded clusters.
Specifying sharded-replicaset
and sharded
together also seemed redundant.
I don't think sharded
should be used for any spec tests that require successfully executing a transaction since an oplog is needed. It looks like there are a few instances of tests requiring sharded
instead of sharded-replicaset
. I'll open a separate JIRA ticket about that.
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.
Updated, and thanks for clearing that up
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.
Just to close the loop here, I created DRIVERS-2609 to clear up other spec tests.
Co-authored-by: Jeremy Mikola <jmikola@gmail.com>
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 also POC-ed the tests in PHPLIB: mongodb/mongo-php-library#1066
Link to github generated document
Process meta:
Adds a specification for the existing runCommand API. Generally, it summarizes requirements across the specifications and links the reader to the more detailed specification on the subject. Adds language that encourages drivers to not inspect nor modify user input, drivers will have to assess their current implementation and determine how that guidance can best be
followed.
Test coverage is targeted at each subject in the spec inspecting command construction is performed as expected. For example, a new test asserts that a database configured with a RC will not attach read concern fields to the user's command document per the spec.
Removing Read Concern and Write Concern settings from the runCommand unified test operation because they intentionally are not supported and no tests have been written to use them.
Please complete the following before merging: