Skip to content

Commit 3200d46

Browse files
authored
DRIVERS-555 Increase GridFS test timeouts and other fixes for CSOT (#1283)
1 parent 10b4a41 commit 3200d46

10 files changed

+158
-97
lines changed

source/client-side-operations-timeout/tests/gridfs-advanced.json

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"schemaVersion": "1.9",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.4"
6+
"minServerVersion": "4.4",
7+
"serverless": "forbid"
78
}
89
],
910
"createEntities": [
@@ -17,7 +18,7 @@
1718
"client": {
1819
"id": "client",
1920
"uriOptions": {
20-
"timeoutMS": 50
21+
"timeoutMS": 75
2122
},
2223
"useMultipleMongoses": false,
2324
"observeEvents": [
@@ -62,13 +63,12 @@
6263
"_id": {
6364
"$oid": "000000000000000000000005"
6465
},
65-
"length": 10,
66+
"length": 8,
6667
"chunkSize": 4,
6768
"uploadDate": {
6869
"$date": "1970-01-01T00:00:00.000Z"
6970
},
70-
"md5": "57d83cd477bfb1ccd975ab33d827a92b",
71-
"filename": "length-10",
71+
"filename": "length-8",
7272
"contentType": "application/octet-stream",
7373
"aliases": [],
7474
"metadata": {}
@@ -93,6 +93,21 @@
9393
"subType": "00"
9494
}
9595
}
96+
},
97+
{
98+
"_id": {
99+
"$oid": "000000000000000000000006"
100+
},
101+
"files_id": {
102+
"$oid": "000000000000000000000005"
103+
},
104+
"n": 1,
105+
"data": {
106+
"$binary": {
107+
"base64": "ESIzRA==",
108+
"subType": "00"
109+
}
110+
}
96111
}
97112
]
98113
}
@@ -116,7 +131,7 @@
116131
"update"
117132
],
118133
"blockConnection": true,
119-
"blockTimeMS": 55
134+
"blockTimeMS": 100
120135
}
121136
}
122137
}
@@ -129,7 +144,7 @@
129144
"$oid": "000000000000000000000005"
130145
},
131146
"newFilename": "foo",
132-
"timeoutMS": 100
147+
"timeoutMS": 2000
133148
}
134149
}
135150
],
@@ -174,7 +189,7 @@
174189
"update"
175190
],
176191
"blockConnection": true,
177-
"blockTimeMS": 55
192+
"blockTimeMS": 100
178193
}
179194
}
180195
}
@@ -234,7 +249,7 @@
234249
"drop"
235250
],
236251
"blockConnection": true,
237-
"blockTimeMS": 55
252+
"blockTimeMS": 100
238253
}
239254
}
240255
}
@@ -243,7 +258,7 @@
243258
"name": "drop",
244259
"object": "bucket",
245260
"arguments": {
246-
"timeoutMS": 100
261+
"timeoutMS": 2000
247262
}
248263
}
249264
]
@@ -266,7 +281,7 @@
266281
"drop"
267282
],
268283
"blockConnection": true,
269-
"blockTimeMS": 55
284+
"blockTimeMS": 100
270285
}
271286
}
272287
}
@@ -320,7 +335,7 @@
320335
"drop"
321336
],
322337
"blockConnection": true,
323-
"blockTimeMS": 55
338+
"blockTimeMS": 100
324339
}
325340
}
326341
}
@@ -352,7 +367,7 @@
352367
"drop"
353368
],
354369
"blockConnection": true,
355-
"blockTimeMS": 30
370+
"blockTimeMS": 50
356371
}
357372
}
358373
}

source/client-side-operations-timeout/tests/gridfs-advanced.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ schemaVersion: "1.9"
44

55
runOnRequirements:
66
- minServerVersion: "4.4"
7+
serverless: forbid # GridFS ops can be slow on serverless.
78

89
createEntities:
910
- client:
@@ -12,7 +13,7 @@ createEntities:
1213
- client:
1314
id: &client client
1415
uriOptions:
15-
timeoutMS: 50
16+
timeoutMS: 75
1617
useMultipleMongoses: false
1718
observeEvents:
1819
- commandStartedEvent
@@ -37,11 +38,10 @@ initialData:
3738
databaseName: *databaseName
3839
documents:
3940
- _id: &fileDocumentId { $oid: "000000000000000000000005" }
40-
length: 10
41+
length: 8
4142
chunkSize: 4
4243
uploadDate: { $date: "1970-01-01T00:00:00.000Z" }
43-
md5: "57d83cd477bfb1ccd975ab33d827a92b"
44-
filename: "length-10"
44+
filename: "length-8"
4545
contentType: "application/octet-stream"
4646
aliases: []
4747
metadata: {}
@@ -52,6 +52,10 @@ initialData:
5252
files_id: *fileDocumentId
5353
n: 0
5454
data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344
55+
- _id: { $oid: "000000000000000000000006" }
56+
files_id: *fileDocumentId
57+
n: 1
58+
data: { $binary: { base64: "ESIzRA==", subType: "00" } } # hex: 11223344
5559

5660
tests:
5761
# Tests for the "rename" operation.
@@ -68,13 +72,13 @@ tests:
6872
data:
6973
failCommands: ["update"]
7074
blockConnection: true
71-
blockTimeMS: 55
75+
blockTimeMS: 100
7276
- name: rename
7377
object: *bucket
7478
arguments:
7579
id: *fileDocumentId
7680
newFilename: "foo"
77-
timeoutMS: 100 # The client timeoutMS is 50 and the operation blocks for 55ms, so 100ms should let it succeed.
81+
timeoutMS: 2000 # The client timeoutMS is 75ms and the operation blocks for 100ms, so 2000ms should let it succeed.
7882
expectEvents:
7983
- client: *client
8084
events:
@@ -97,7 +101,7 @@ tests:
97101
data:
98102
failCommands: ["update"]
99103
blockConnection: true
100-
blockTimeMS: 55
104+
blockTimeMS: 100
101105
- name: rename
102106
object: *bucket
103107
arguments:
@@ -130,11 +134,11 @@ tests:
130134
data:
131135
failCommands: ["drop"]
132136
blockConnection: true
133-
blockTimeMS: 55
137+
blockTimeMS: 100
134138
- name: drop
135139
object: *bucket
136140
arguments:
137-
timeoutMS: 100 # The client timeoutMS is 50 and the operation blocks for 55ms, so 100ms should let it succeed.
141+
timeoutMS: 2000 # The client timeoutMS is 75ms and the operation blocks for 100ms, so 2000ms should let it succeed.
138142

139143
- description: "timeoutMS applied to files collection drop"
140144
operations:
@@ -148,7 +152,7 @@ tests:
148152
data:
149153
failCommands: ["drop"]
150154
blockConnection: true
151-
blockTimeMS: 55
155+
blockTimeMS: 100
152156
- name: drop
153157
object: *bucket
154158
expectError:
@@ -177,7 +181,7 @@ tests:
177181
data:
178182
failCommands: ["drop"]
179183
blockConnection: true
180-
blockTimeMS: 55
184+
blockTimeMS: 100
181185
- name: drop
182186
object: *bucket
183187
expectError:
@@ -195,7 +199,7 @@ tests:
195199
data:
196200
failCommands: ["drop"]
197201
blockConnection: true
198-
blockTimeMS: 30
202+
blockTimeMS: 50
199203
- name: drop
200204
object: *bucket
201205
expectError:

source/client-side-operations-timeout/tests/gridfs-delete.json

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"schemaVersion": "1.9",
44
"runOnRequirements": [
55
{
6-
"minServerVersion": "4.4"
6+
"minServerVersion": "4.4",
7+
"serverless": "forbid"
78
}
89
],
910
"createEntities": [
@@ -17,7 +18,7 @@
1718
"client": {
1819
"id": "client",
1920
"uriOptions": {
20-
"timeoutMS": 50
21+
"timeoutMS": 75
2122
},
2223
"useMultipleMongoses": false,
2324
"observeEvents": [
@@ -62,13 +63,12 @@
6263
"_id": {
6364
"$oid": "000000000000000000000005"
6465
},
65-
"length": 10,
66+
"length": 8,
6667
"chunkSize": 4,
6768
"uploadDate": {
6869
"$date": "1970-01-01T00:00:00.000Z"
6970
},
70-
"md5": "57d83cd477bfb1ccd975ab33d827a92b",
71-
"filename": "length-10",
71+
"filename": "length-8",
7272
"contentType": "application/octet-stream",
7373
"aliases": [],
7474
"metadata": {}
@@ -93,6 +93,21 @@
9393
"subType": "00"
9494
}
9595
}
96+
},
97+
{
98+
"_id": {
99+
"$oid": "000000000000000000000006"
100+
},
101+
"files_id": {
102+
"$oid": "000000000000000000000005"
103+
},
104+
"n": 1,
105+
"data": {
106+
"$binary": {
107+
"base64": "ESIzRA==",
108+
"subType": "00"
109+
}
110+
}
96111
}
97112
]
98113
}
@@ -116,7 +131,7 @@
116131
"delete"
117132
],
118133
"blockConnection": true,
119-
"blockTimeMS": 55
134+
"blockTimeMS": 100
120135
}
121136
}
122137
}
@@ -128,7 +143,7 @@
128143
"id": {
129144
"$oid": "000000000000000000000005"
130145
},
131-
"timeoutMS": 100
146+
"timeoutMS": 1000
132147
}
133148
}
134149
]
@@ -151,7 +166,7 @@
151166
"delete"
152167
],
153168
"blockConnection": true,
154-
"blockTimeMS": 55
169+
"blockTimeMS": 100
155170
}
156171
}
157172
}
@@ -210,7 +225,7 @@
210225
"delete"
211226
],
212227
"blockConnection": true,
213-
"blockTimeMS": 55
228+
"blockTimeMS": 100
214229
}
215230
}
216231
}
@@ -247,7 +262,7 @@
247262
"delete"
248263
],
249264
"blockConnection": true,
250-
"blockTimeMS": 30
265+
"blockTimeMS": 50
251266
}
252267
}
253268
}

0 commit comments

Comments
 (0)