Commit ac6260e
feat(testing-sdk): support running cloud tests asynchronously (#92)
*Issue #, if available:*
DAR-SDK-305
*Description of changes:*
Adding support for running cloud tests with `InvocationType.Event`
(async invoke).
The implementation uses a HistoryPoller class which will poll the
execution history to get all events. Customers will be able to specify
if they want to use async or sync executions using the `invocationType`
parameter. By default, the runner will use sync executions only and
`waitFor` will throw an error unless they use `InvocationType.Event`.
Additionally:
- Enabling wait-for-callback.test.ts to run on both cloud and local
runners
- Adjust integration-test.js script to allow running specific tests
TODO:
- Stop the execution and polling if the test fails. Currently it will
run forever if the test fails.
- Add a test that has many events (this will take time to run since it
needs to generate a lot of events -> maybe run this only on push?)
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.1 parent 61e111b commit ac6260e
File tree
14 files changed
+1947
-549
lines changed- .github/workflows/scripts/integration-test
- packages
- aws-durable-execution-sdk-js-examples
- src/examples
- __tests__
- aws-durable-execution-sdk-js-testing/src/test-runner
- cloud
- __tests__
- operations
- __tests__
- utils/__tests__
- common
- __tests__
- operations
14 files changed
+1947
-549
lines changedLines changed: 31 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
239 | 246 | | |
240 | 247 | | |
241 | 248 | | |
| |||
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
| 283 | + | |
276 | 284 | | |
277 | 285 | | |
278 | 286 | | |
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
| 290 | + | |
282 | 291 | | |
283 | 292 | | |
284 | 293 | | |
| |||
297 | 306 | | |
298 | 307 | | |
299 | 308 | | |
300 | | - | |
| 309 | + | |
301 | 310 | | |
302 | 311 | | |
303 | 312 | | |
| |||
312 | 321 | | |
313 | 322 | | |
314 | 323 | | |
315 | | - | |
| 324 | + | |
316 | 325 | | |
317 | 326 | | |
318 | 327 | | |
319 | 328 | | |
320 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
321 | 333 | | |
322 | 334 | | |
323 | 335 | | |
324 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
325 | 341 | | |
326 | 342 | | |
327 | 343 | | |
| |||
332 | 348 | | |
333 | 349 | | |
334 | 350 | | |
| 351 | + | |
335 | 352 | | |
336 | 353 | | |
337 | 354 | | |
338 | 355 | | |
339 | 356 | | |
| 357 | + | |
340 | 358 | | |
341 | 359 | | |
342 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
343 | 363 | | |
344 | 364 | | |
345 | 365 | | |
| |||
348 | 368 | | |
349 | 369 | | |
350 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
351 | 376 | | |
352 | 377 | | |
353 | 378 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| |||
Lines changed: 27 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
17 | 14 | | |
18 | | - | |
| 15 | + | |
19 | 16 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
23 | 20 | | |
24 | | - | |
| 21 | + | |
25 | 22 | | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | | - | |
| 27 | + | |
31 | 28 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
35 | 32 | | |
36 | | - | |
| 33 | + | |
37 | 34 | | |
38 | | - | |
| 35 | + | |
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
43 | 39 | | |
44 | | - | |
| 40 | + | |
| 41 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
0 commit comments