-
Notifications
You must be signed in to change notification settings - Fork 917
Convert change streams spec tests to unified format #949
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
Convert change streams spec tests to unified format #949
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.
Nice work!
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.
Excellent job! Thank you!
@@ -454,7 +475,14 @@ func executeEstimatedDocumentCount(ctx context.Context, operation *operation) (* | |||
} | |||
|
|||
opts := options.EstimatedDocumentCount() | |||
elems, _ := operation.Arguments.Elements() | |||
var elems []bson.RawElement | |||
// Some estimatedDocumentCount operations in the unified test format have no arguments. |
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.
Most of the estimatedDocumentCount
operations in unified/estimatedDocumentCount
do not have an arguments
field, so I've added a special conditional here. I could add this to all execute*
functions, but it should be easy to add later on if we encounter other operations with no arguments.
I checked to see who wrote these tests and decided to recklessly not include the arguments
field, and it was me a year ago 😢 .
GODRIVER-1986
GODRIVER-2362
GODRIVER-2296
Converts the change streams spec tests to the unified test format. Removes the legacy change stream spec test runner and associated functions. Adds tests to ensure the "to" field is present in
rename
events. Adds tests to ensure we do not error when parsing change stream event documents. Bumps supported unified test format schema version to 1.7. Adds support forignoreExtraEvents
and therename
operation in the unified test runner.