Skip to content

Commit 9a8a207

Browse files
committed
Merge
1 parent 83b3127 commit 9a8a207

File tree

104 files changed

+13900
-894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+13900
-894
lines changed

specifications/client-backpressure/tests/backpressure-retry-loop.json

Lines changed: 2759 additions & 0 deletions
Large diffs are not rendered by default.

specifications/client-backpressure/tests/backpressure-retry-loop.yml

Lines changed: 1307 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Tests in this file are generated from backpressure-retry-loop.yml.template.
2+
3+
description: tests that operations respect overload backoff retry loop
4+
5+
schemaVersion: '1.3'
6+
7+
runOnRequirements:
8+
- minServerVersion: '4.4' # failCommand
9+
topologies: [replicaset, sharded, load-balanced]
10+
11+
createEntities:
12+
- client:
13+
id: &client client
14+
useMultipleMongoses: false
15+
observeEvents: [commandStartedEvent, commandSucceededEvent, commandFailedEvent]
16+
17+
- client:
18+
id: &internal_client internal_client
19+
useMultipleMongoses: false
20+
21+
- database:
22+
id: &internal_db internal_db
23+
client: *internal_client
24+
databaseName: &database_name retryable-writes-tests
25+
26+
- collection:
27+
id: &internal_collection retryable-writes-tests
28+
database: *internal_db
29+
collectionName: &collection_name coll
30+
31+
- database:
32+
id: &database database
33+
client: *client
34+
databaseName: *database_name
35+
36+
- collection:
37+
id: &collection collection
38+
database: *database
39+
collectionName: *collection_name
40+
41+
initialData:
42+
- collectionName: *collection_name
43+
databaseName: *database_name
44+
documents: []
45+
46+
_yamlAnchors:
47+
bulWriteInsertNamespace: &client_bulk_write_ns retryable-writes-tests.coll
48+
49+
tests: {% for operation in operations %}
50+
- description: '{{operation.object}}.{{operation.operation_name}} retries using operation loop' {%- if ((operation.operation_name == 'clientBulkWrite')) %}
51+
runOnRequirements:
52+
- minServerVersion: '8.0' # client bulk write added to server in 8.0
53+
{%- endif %}
54+
operations: {%- if operation.operation_name == "dropIndex" %}
55+
- name: createIndex
56+
object: *internal_collection
57+
arguments:
58+
keys: { x: 11 }
59+
name: "x_11"
60+
{%- endif %}
61+
- name: failPoint
62+
object: testRunner
63+
arguments:
64+
client: *internal_client
65+
failPoint:
66+
configureFailPoint: failCommand
67+
mode: { times: 3 }
68+
data:
69+
failCommands: [{{operation.command_name}}]
70+
errorLabels: [RetryableError, SystemOverloadedError]
71+
errorCode: 2
72+
73+
- name: {{operation.operation_name}}
74+
object: *{{operation.object}}
75+
{%- if operation.arguments|length > 0 %}
76+
arguments:
77+
{%- for arg in operation.arguments %}
78+
{{arg}}
79+
{%- endfor -%}
80+
{%- endif %}
81+
82+
expectEvents:
83+
- client: *client
84+
events:
85+
- commandStartedEvent:
86+
commandName: {{operation.command_name}}
87+
- commandFailedEvent:
88+
commandName: {{operation.command_name}}
89+
- commandStartedEvent:
90+
commandName: {{operation.command_name}}
91+
- commandFailedEvent:
92+
commandName: {{operation.command_name}}
93+
- commandStartedEvent:
94+
commandName: {{operation.command_name}}
95+
- commandFailedEvent:
96+
commandName: {{operation.command_name}}
97+
- commandStartedEvent:
98+
commandName: {{operation.command_name}}
99+
- commandSucceededEvent:
100+
commandName: {{operation.command_name}}
101+
{% endfor -%}

0 commit comments

Comments
 (0)