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-2489 Properly skip createChangeStream tests on serverless #1346
Conversation
Tests are passing in Python here: mongodb/mongo-python-driver#1116 |
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.
The retryable write template changes may be unnecessary but I defer to you.
{%- if operation.operation_name == 'createChangeStream' %} | ||
runOnRequirements: | ||
- serverless: forbid | ||
{%- endif %} |
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 this just done for consistency? It seems unlikely that createChangeStream
would ever be tested for retryable writes.
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.
It seems unlikely
Note, this was also why the retryable writes template file does not contain other change stream specific behavior such as saveResultAsEntity
.
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.
Oh I did this without thinking. Removed.
@@ -209,6 +210,8 @@ tests: | |||
commandName: listDatabases | |||
|
|||
- description: "createChangeStream succeeds after retryable handshake network error" |
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 just found another problem with these tests. The createChangeStream test names are duplicated, "createChangeStream succeeds after retryable handshake network error"
appears 3 times. This is a problem since test descriptions are expected to be unique within a file.
Okay I removed the unneeded retryable-writes template changes and fixed the duplicate descriptions problem (by adding operation.object). |
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.
Confirmed the changes pass on the C Driver after updating test descriptions for skipped (unsupported) operations.
This PR fixes an issue with the tests added in #1336
Change streams don't yet work on serverless so we have to skip createChangeStream tests there.
Please complete the following before merging: