Skip to content
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

Merged
merged 6 commits into from Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -2,7 +2,7 @@

description: "retryable reads handshake failures"

schemaVersion: "1.3"
schemaVersion: "1.4"

runOnRequirements:
- minServerVersion: "4.2"
Expand Down Expand Up @@ -53,6 +53,10 @@ tests:
# - Tests whether operation successfully retries the handshake and succeeds.
{% for operation in operations %}
- description: "{{operation.operation_name}} succeeds after retryable handshake network error"
{%- if operation.operation_name == 'createChangeStream' %}
runOnRequirements:
- serverless: forbid
{%- endif %}
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -100,6 +104,10 @@ tests:
commandName: {{operation.command_name}}

- description: "{{operation.operation_name}} succeeds after retryable handshake server error (ShutdownInProgress)"
{%- if operation.operation_name == 'createChangeStream' %}
runOnRequirements:
- serverless: forbid
{%- endif %}
operations:
- name: failPoint
object: testRunner
Expand Down
32 changes: 31 additions & 1 deletion source/retryable-reads/tests/unified/handshakeError.json
@@ -1,6 +1,6 @@
{
"description": "retryable reads handshake failures",
"schemaVersion": "1.3",
"schemaVersion": "1.4",
"runOnRequirements": [
{
"minServerVersion": "4.2",
Expand Down Expand Up @@ -429,6 +429,11 @@
},
{
"description": "createChangeStream succeeds after retryable handshake network error",
"runOnRequirements": [
{
"serverless": "forbid"
}
],
"operations": [
{
"name": "failPoint",
Expand Down Expand Up @@ -523,6 +528,11 @@
},
{
"description": "createChangeStream succeeds after retryable handshake server error (ShutdownInProgress)",
"runOnRequirements": [
{
"serverless": "forbid"
}
],
"operations": [
{
"name": "failPoint",
Expand Down Expand Up @@ -1189,6 +1199,11 @@
},
{
"description": "createChangeStream succeeds after retryable handshake network error",
"runOnRequirements": [
{
"serverless": "forbid"
}
],
"operations": [
{
"name": "failPoint",
Expand Down Expand Up @@ -1283,6 +1298,11 @@
},
{
"description": "createChangeStream succeeds after retryable handshake server error (ShutdownInProgress)",
"runOnRequirements": [
{
"serverless": "forbid"
}
],
"operations": [
{
"name": "failPoint",
Expand Down Expand Up @@ -2849,6 +2869,11 @@
},
{
"description": "createChangeStream succeeds after retryable handshake network error",
"runOnRequirements": [
{
"serverless": "forbid"
}
],
"operations": [
{
"name": "failPoint",
Expand Down Expand Up @@ -2943,6 +2968,11 @@
},
{
"description": "createChangeStream succeeds after retryable handshake server error (ShutdownInProgress)",
"runOnRequirements": [
{
"serverless": "forbid"
}
],
"operations": [
{
"name": "failPoint",
Expand Down
14 changes: 13 additions & 1 deletion source/retryable-reads/tests/unified/handshakeError.yml
Expand Up @@ -2,7 +2,7 @@

description: "retryable reads handshake failures"

schemaVersion: "1.3"
schemaVersion: "1.4"

runOnRequirements:
- minServerVersion: "4.2"
Expand Down Expand Up @@ -209,6 +209,8 @@ tests:
commandName: listDatabases

- description: "createChangeStream succeeds after retryable handshake network error"
Copy link
Member Author

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.

runOnRequirements:
- serverless: forbid
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -250,6 +252,8 @@ tests:
commandName: aggregate

- description: "createChangeStream succeeds after retryable handshake server error (ShutdownInProgress)"
runOnRequirements:
- serverless: forbid
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -531,6 +535,8 @@ tests:
commandName: listCollections

- description: "createChangeStream succeeds after retryable handshake network error"
runOnRequirements:
- serverless: forbid
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -572,6 +578,8 @@ tests:
commandName: aggregate

- description: "createChangeStream succeeds after retryable handshake server error (ShutdownInProgress)"
runOnRequirements:
- serverless: forbid
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -1243,6 +1251,8 @@ tests:
commandName: listIndexes

- description: "createChangeStream succeeds after retryable handshake network error"
runOnRequirements:
- serverless: forbid
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -1284,6 +1294,8 @@ tests:
commandName: aggregate

- description: "createChangeStream succeeds after retryable handshake server error (ShutdownInProgress)"
runOnRequirements:
- serverless: forbid
operations:
- name: failPoint
object: testRunner
Expand Down
Expand Up @@ -2,7 +2,7 @@

description: "retryable writes handshake failures"

schemaVersion: "1.3"
schemaVersion: "1.4"

runOnRequirements:
- minServerVersion: "4.2"
Expand Down Expand Up @@ -51,6 +51,10 @@ tests:
# - Tests whether operation successfully retries the handshake and succeeds.
{% for operation in operations %}
- description: "{{operation.operation_name}} succeeds after retryable handshake network error"
{%- if operation.operation_name == 'createChangeStream' %}
runOnRequirements:
- serverless: forbid
{%- endif %}
Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -95,6 +99,10 @@ tests:
commandName: {{operation.command_name}}

- description: "{{operation.operation_name}} succeeds after retryable handshake server error (ShutdownInProgress)"
{%- if operation.operation_name == 'createChangeStream' %}
runOnRequirements:
- serverless: forbid
{%- endif %}
operations:
- name: failPoint
object: testRunner
Expand Down
@@ -1,6 +1,6 @@
{
"description": "retryable writes handshake failures",
"schemaVersion": "1.3",
"schemaVersion": "1.4",
"runOnRequirements": [
{
"minServerVersion": "4.2",
Expand Down
2 changes: 1 addition & 1 deletion source/retryable-writes/tests/unified/handshakeError.yml
Expand Up @@ -2,7 +2,7 @@

description: "retryable writes handshake failures"

schemaVersion: "1.3"
schemaVersion: "1.4"

runOnRequirements:
- minServerVersion: "4.2"
Expand Down