From 0bcfac29313cc97643bafc26549372ee052d897f Mon Sep 17 00:00:00 2001 From: Daria Pardue Date: Tue, 10 Mar 2026 16:24:28 -0400 Subject: [PATCH 1/2] remove unnecessary template files from spec tests --- .../backpressure-retry-loop.yml.template | 101 ------------------ ...ckpressure-retry-max-attempts.yml.template | 101 ------------------ 2 files changed, 202 deletions(-) delete mode 100644 test/spec/client-backpressure/backpressure-retry-loop.yml.template delete mode 100644 test/spec/client-backpressure/backpressure-retry-max-attempts.yml.template diff --git a/test/spec/client-backpressure/backpressure-retry-loop.yml.template b/test/spec/client-backpressure/backpressure-retry-loop.yml.template deleted file mode 100644 index bd64827d4e6..00000000000 --- a/test/spec/client-backpressure/backpressure-retry-loop.yml.template +++ /dev/null @@ -1,101 +0,0 @@ -# Tests in this file are generated from backpressure-retry-loop.yml.template. - -description: tests that operations respect overload backoff retry loop - -schemaVersion: '1.3' - -runOnRequirements: - - minServerVersion: '4.4' # failCommand - topologies: [replicaset, sharded, load-balanced] - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: [commandStartedEvent, commandSucceededEvent, commandFailedEvent] - - - client: - id: &internal_client internal_client - useMultipleMongoses: false - - - database: - id: &internal_db internal_db - client: *internal_client - databaseName: &database_name retryable-writes-tests - - - collection: - id: &internal_collection retryable-writes-tests - database: *internal_db - collectionName: &collection_name coll - - - database: - id: &database database - client: *client - databaseName: *database_name - - - collection: - id: &collection collection - database: *database - collectionName: *collection_name - -initialData: -- collectionName: *collection_name - databaseName: *database_name - documents: [] - -_yamlAnchors: - bulWriteInsertNamespace: &client_bulk_write_ns retryable-writes-tests.coll - -tests: {% for operation in operations %} - - description: '{{operation.object}}.{{operation.operation_name}} retries using operation loop' {%- if ((operation.operation_name == 'clientBulkWrite')) %} - runOnRequirements: - - minServerVersion: '8.0' # client bulk write added to server in 8.0 - {%- endif %} - operations: {%- if operation.operation_name == "dropIndex" %} - - name: createIndex - object: *internal_collection - arguments: - keys: { x: 11 } - name: "x_11" - {%- endif %} - - name: failPoint - object: testRunner - arguments: - client: *internal_client - failPoint: - configureFailPoint: failCommand - mode: { times: 3 } - data: - failCommands: [{{operation.command_name}}] - errorLabels: [RetryableError, SystemOverloadedError] - errorCode: 2 - - - name: {{operation.operation_name}} - object: *{{operation.object}} - {%- if operation.arguments|length > 0 %} - arguments: - {%- for arg in operation.arguments %} - {{arg}} - {%- endfor -%} - {%- endif %} - - expectEvents: - - client: *client - events: - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandSucceededEvent: - commandName: {{operation.command_name}} -{% endfor -%} diff --git a/test/spec/client-backpressure/backpressure-retry-max-attempts.yml.template b/test/spec/client-backpressure/backpressure-retry-max-attempts.yml.template deleted file mode 100644 index 3a9cb27ab53..00000000000 --- a/test/spec/client-backpressure/backpressure-retry-max-attempts.yml.template +++ /dev/null @@ -1,101 +0,0 @@ -# Tests in this file are generated from backpressure-retry-max-attempts.yml.template. - -description: tests that operations retry at most maxAttempts=5 times - -schemaVersion: '1.3' - -runOnRequirements: - - - minServerVersion: '4.4' # failCommand - topologies: [replicaset, sharded, load-balanced] - -createEntities: - - client: - id: &client client - useMultipleMongoses: false - observeEvents: [commandStartedEvent, commandSucceededEvent, commandFailedEvent] - - - client: - id: &fail_point_client fail_point_client - useMultipleMongoses: false - - - database: - id: &database database - client: *client - databaseName: &database_name retryable-writes-tests - - - collection: - id: &collection collection - database: *database - collectionName: &collection_name coll - -_yamlAnchors: - bulkWriteInsertNamespace: &client_bulk_write_ns retryable-writes-tests.coll - -initialData: - - collectionName: *collection_name - databaseName: *database_name - documents: - - { _id: 1, x: 11 } - - { _id: 2, x: 22 } - -tests: {% for operation in operations %} - - description: '{{operation.object}}.{{operation.operation_name}} retries at most maxAttempts=5 times' - {%- if ((operation.operation_name == 'clientBulkWrite')) %} - runOnRequirements: - - minServerVersion: '8.0' # client bulk write added to server in 8.0 - {%- endif %} - operations: - - name: failPoint - object: testRunner - arguments: - client: *fail_point_client - failPoint: - configureFailPoint: failCommand - mode: alwaysOn - data: - failCommands: [{{operation.command_name}}] - errorLabels: [RetryableError, SystemOverloadedError] - errorCode: 2 - - - name: {{operation.operation_name}} - object: *{{operation.object}} {%- if operation.arguments|length > 0 %} - arguments: - {%- for arg in operation.arguments %} - {{arg}} - {%- endfor -%} - {%- endif %} - expectError: - isError: true - isClientError: false - - expectEvents: - - client: *client - events: - # we expect 6 pairs of command started and succeeded events: - # 1 initial attempt and 5 retries. - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} - - commandStartedEvent: - commandName: {{operation.command_name}} - - commandFailedEvent: - commandName: {{operation.command_name}} -{% endfor -%} From 3e1b32429acc9873829c461854b0b43e31be1124 Mon Sep 17 00:00:00 2001 From: Daria Pardue Date: Tue, 10 Mar 2026 16:25:33 -0400 Subject: [PATCH 2/2] update backpressure getMore-retried spec tests to latest --- .../client-backpressure/getMore-retried.json | 4 ++- .../client-backpressure/getMore-retried.yml | 32 ++++++++++--------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/test/spec/client-backpressure/getMore-retried.json b/test/spec/client-backpressure/getMore-retried.json index fed6ab8cb95..5fd76be6796 100644 --- a/test/spec/client-backpressure/getMore-retried.json +++ b/test/spec/client-backpressure/getMore-retried.json @@ -10,6 +10,7 @@ { "client": { "id": "client0", + "useMultipleMongoses": false, "observeEvents": [ "commandStartedEvent", "commandFailedEvent", @@ -19,7 +20,8 @@ }, { "client": { - "id": "failPointClient" + "id": "failPointClient", + "useMultipleMongoses": false } }, { diff --git a/test/spec/client-backpressure/getMore-retried.yml b/test/spec/client-backpressure/getMore-retried.yml index 45f5ad9deb6..d7111f6e50f 100644 --- a/test/spec/client-backpressure/getMore-retried.yml +++ b/test/spec/client-backpressure/getMore-retried.yml @@ -5,12 +5,14 @@ runOnRequirements: createEntities: - client: id: &client client0 + useMultipleMongoses: false observeEvents: - commandStartedEvent - commandFailedEvent - commandSucceededEvent - client: id: &failPointClient failPointClient + useMultipleMongoses: false - database: id: db client: *client @@ -26,7 +28,7 @@ initialData: - { a: 1 } - { a: 2 } - { a: 3 } - + tests: - description: "getMores are retried" operations: @@ -60,27 +62,27 @@ tests: events: - commandStartedEvent: commandName: find - - commandSucceededEvent: + - commandSucceededEvent: commandName: find # first attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # second attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # third attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # success - commandStartedEvent: commandName: getMore - - commandSucceededEvent: + - commandSucceededEvent: commandName: getMore - description: "getMores are retried maxAttempts=5 times" @@ -111,39 +113,39 @@ tests: events: - commandStartedEvent: commandName: find - - commandSucceededEvent: + - commandSucceededEvent: commandName: find # first attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # second attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # third attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # fourth attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # fifth attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore # final attempt - commandStartedEvent: commandName: getMore - - commandFailedEvent: + - commandFailedEvent: commandName: getMore - commandStartedEvent: commandName: killCursors - - commandSucceededEvent: - commandName: killCursors \ No newline at end of file + - commandSucceededEvent: + commandName: killCursors