Skip to content

Commit aab5852

Browse files
author
Divjot Arora
committed
add JSON files
1 parent c197d6f commit aab5852

31 files changed

+39657
-441
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
{
2+
"runOn": [
3+
{
4+
"minServerVersion": "4.4"
5+
}
6+
],
7+
"database_name": "cse-timeouts-db",
8+
"collection_name": "cse-timeouts-coll",
9+
"data": [],
10+
"json_schema": {
11+
"properties": {
12+
"encrypted_w_altname": {
13+
"encrypt": {
14+
"keyId": "/altname",
15+
"bsonType": "string",
16+
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
17+
}
18+
},
19+
"encrypted_string": {
20+
"encrypt": {
21+
"keyId": [
22+
{
23+
"$binary": {
24+
"base64": "AAAAAAAAAAAAAAAAAAAAAA==",
25+
"subType": "04"
26+
}
27+
}
28+
],
29+
"bsonType": "string",
30+
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
31+
}
32+
},
33+
"random": {
34+
"encrypt": {
35+
"keyId": [
36+
{
37+
"$binary": {
38+
"base64": "AAAAAAAAAAAAAAAAAAAAAA==",
39+
"subType": "04"
40+
}
41+
}
42+
],
43+
"bsonType": "string",
44+
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Random"
45+
}
46+
},
47+
"encrypted_string_equivalent": {
48+
"encrypt": {
49+
"keyId": [
50+
{
51+
"$binary": {
52+
"base64": "AAAAAAAAAAAAAAAAAAAAAA==",
53+
"subType": "04"
54+
}
55+
}
56+
],
57+
"bsonType": "string",
58+
"algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
59+
}
60+
}
61+
},
62+
"bsonType": "object"
63+
},
64+
"key_vault_data": [
65+
{
66+
"status": 1,
67+
"_id": {
68+
"$binary": {
69+
"base64": "AAAAAAAAAAAAAAAAAAAAAA==",
70+
"subType": "04"
71+
}
72+
},
73+
"masterKey": {
74+
"provider": "aws",
75+
"key": "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0",
76+
"region": "us-east-1"
77+
},
78+
"updateDate": {
79+
"$date": {
80+
"$numberLong": "1552949630483"
81+
}
82+
},
83+
"keyMaterial": {
84+
"$binary": {
85+
"base64": "AQICAHhQNmWG2CzOm1dq3kWLM+iDUZhEqnhJwH9wZVpuZ94A8gEqnsxXlR51T5EbEVezUqqKAAAAwjCBvwYJKoZIhvcNAQcGoIGxMIGuAgEAMIGoBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDHa4jo6yp0Z18KgbUgIBEIB74sKxWtV8/YHje5lv5THTl0HIbhSwM6EqRlmBiFFatmEWaeMk4tO4xBX65eq670I5TWPSLMzpp8ncGHMmvHqRajNBnmFtbYxN3E3/WjxmdbOOe+OXpnGJPcGsftc7cB2shRfA4lICPnE26+oVNXT6p0Lo20nY5XC7jyCO",
86+
"subType": "00"
87+
}
88+
},
89+
"creationDate": {
90+
"$date": {
91+
"$numberLong": "1552949630483"
92+
}
93+
},
94+
"keyAltNames": [
95+
"altname",
96+
"another_altname"
97+
]
98+
}
99+
],
100+
"tests": [
101+
{
102+
"description": "timeoutMS applied to listCollections to get collection schema",
103+
"failPoint": {
104+
"configureFailPoint": "failCommand",
105+
"mode": {
106+
"times": 1
107+
},
108+
"data": {
109+
"failCommands": [
110+
"listCollections"
111+
],
112+
"blockConnection": true,
113+
"blockTimeMS": 60
114+
}
115+
},
116+
"clientOptions": {
117+
"autoEncryptOpts": {
118+
"kmsProviders": {
119+
"aws": {}
120+
}
121+
},
122+
"timeoutMS": 50
123+
},
124+
"operations": [
125+
{
126+
"name": "insertOne",
127+
"arguments": {
128+
"document": {
129+
"_id": 1,
130+
"encrypted_string": "string0",
131+
"random": "abc"
132+
}
133+
},
134+
"result": {
135+
"isTimeoutError": true
136+
}
137+
}
138+
],
139+
"expectations": [
140+
{
141+
"command_started_event": {
142+
"command": {
143+
"listCollections": 1,
144+
"filter": {
145+
"name": "cse-timeouts-coll"
146+
},
147+
"maxTimeMS": {
148+
"$$type": [
149+
"int",
150+
"long"
151+
]
152+
}
153+
},
154+
"command_name": "listCollections"
155+
}
156+
}
157+
]
158+
},
159+
{
160+
"description": "remaining timeoutMS applied to find to get keyvault data",
161+
"failPoint": {
162+
"configureFailPoint": "failCommand",
163+
"mode": {
164+
"times": 3
165+
},
166+
"data": {
167+
"failCommands": [
168+
"listCollections",
169+
"find"
170+
],
171+
"blockConnection": true,
172+
"blockTimeMS": 20
173+
}
174+
},
175+
"clientOptions": {
176+
"autoEncryptOpts": {
177+
"kmsProviders": {
178+
"aws": {}
179+
}
180+
},
181+
"timeoutMS": 50
182+
},
183+
"operations": [
184+
{
185+
"name": "insertOne",
186+
"arguments": {
187+
"document": {
188+
"_id": 1,
189+
"encrypted_string": "string0",
190+
"random": "abc"
191+
}
192+
},
193+
"result": {
194+
"isTimeoutError": true
195+
}
196+
}
197+
]
198+
}
199+
]
200+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
{
2+
"description": "timeoutMS behaves correctly for bulkWrite operations",
3+
"schemaVersion": "1.5",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "4.4"
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "failPointClient",
13+
"useMultipleMongoses": false
14+
}
15+
},
16+
{
17+
"client": {
18+
"id": "client",
19+
"useMultipleMongoses": false,
20+
"observeEvents": [
21+
"commandStartedEvent"
22+
]
23+
}
24+
},
25+
{
26+
"database": {
27+
"id": "database",
28+
"client": "client",
29+
"databaseName": "test"
30+
}
31+
},
32+
{
33+
"collection": {
34+
"id": "collection",
35+
"database": "database",
36+
"collectionName": "coll"
37+
}
38+
}
39+
],
40+
"initialData": [
41+
{
42+
"collectionName": "coll",
43+
"databaseName": "test",
44+
"documents": []
45+
}
46+
],
47+
"tests": [
48+
{
49+
"description": "timeoutMS applied to entire bulkWrite, not individual commands",
50+
"operations": [
51+
{
52+
"name": "failPoint",
53+
"object": "testRunner",
54+
"arguments": {
55+
"client": "failPointClient",
56+
"failPoint": {
57+
"configureFailPoint": "failCommand",
58+
"mode": {
59+
"times": 2
60+
},
61+
"data": {
62+
"failCommands": [
63+
"insert",
64+
"update"
65+
],
66+
"blockConnection": true,
67+
"blockTimeMS": 30
68+
}
69+
}
70+
}
71+
},
72+
{
73+
"name": "bulkWrite",
74+
"object": "collection",
75+
"arguments": {
76+
"requests": [
77+
{
78+
"insertOne": {
79+
"document": {
80+
"_id": 1
81+
}
82+
}
83+
},
84+
{
85+
"replaceOne": {
86+
"filter": {
87+
"_id": 1
88+
},
89+
"replacement": {
90+
"x": 1
91+
}
92+
}
93+
}
94+
],
95+
"timeoutMS": 50
96+
},
97+
"expectError": {
98+
"isTimeoutError": true
99+
}
100+
}
101+
],
102+
"expectEvents": [
103+
{
104+
"client": "client",
105+
"events": [
106+
{
107+
"commandStartedEvent": {
108+
"commandName": "insert",
109+
"databaseName": "test",
110+
"command": {
111+
"insert": "coll",
112+
"maxTimeMS": {
113+
"$$type": [
114+
"int",
115+
"long"
116+
]
117+
}
118+
}
119+
}
120+
},
121+
{
122+
"commandStartedEvent": {
123+
"commandName": "update",
124+
"databaseName": "test",
125+
"command": {
126+
"update": "coll",
127+
"maxTimeMS": {
128+
"$$type": [
129+
"int",
130+
"long"
131+
]
132+
}
133+
}
134+
}
135+
}
136+
]
137+
}
138+
]
139+
}
140+
]
141+
}

0 commit comments

Comments
 (0)