Skip to content

Commit 3bd4530

Browse files
committed
ci: Fix validation tests for sb workflows
Signed-off-by: Javier Aliaga <[email protected]>
1 parent 0a860be commit 3bd4530

File tree

1 file changed

+33
-42
lines changed

1 file changed

+33
-42
lines changed

spring-boot-examples/workflows/README.md

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ expected_stdout_lines:
2424
- 'Started WorkflowPatternsApplication'
2525
background: true
2626
expected_return_code: 143
27-
timeout_seconds: 180
27+
timeout_seconds: 120
2828
-->
2929
<!-- Timeout for above service must be more than sleep + timeout for the client-->
3030

@@ -34,15 +34,6 @@ timeout_seconds: 180
3434

3535
<!-- END_STEP -->
3636

37-
<!-- STEP
38-
name: Wait until app is ready
39-
match_order: none
40-
output_match_mode: substring
41-
expected_stdout_lines:
42-
background: false
43-
sleep: 20
44-
-->
45-
<!-- END_STEP -->
4637
By running the `spring-boot:test-run` goal, the application is loaded using the [test configurations](src/test/java/io/dapr/springboot/examples/wfp/DaprTestContainersConfig.java)
4738
configured using [Testcontainers](https://testcontainers.com) to boostrap the [Dapr](https://dapr.io) sidecar and control plane.
4839

@@ -74,15 +65,15 @@ match_order: none
7465
output_match_mode: substring
7566
expected_stdout_lines:
7667
- 'TOKYO, LONDON, SEATTLE'
77-
background: false
78-
timeout_seconds: 10
68+
background: true
69+
timeout_seconds: 60
7970
-->
8071
<!-- Timeout for above service must be more than sleep + timeout for the client-->
8172

8273
To start the workflow with the three chained activities you can run:
8374

8475
```sh
85-
curl -X POST localhost:8080/wfp/chain -H 'Content-Type: application/json'
76+
sleep 25 && curl -X POST localhost:8080/wfp/chain -H 'Content-Type: application/json'
8677
```
8778

8879
<!-- END_STEP -->
@@ -151,15 +142,15 @@ match_order: none
151142
output_match_mode: substring
152143
expected_stdout_lines:
153144
- '!wolfkroW rpaD olleH'
154-
background: false
155-
timeout_seconds: 10
145+
background: true
146+
timeout_seconds: 60
156147
-->
157148
<!-- Timeout for above service must be more than sleep + timeout for the client-->
158149

159150
To start the workflow with the three chained activities you can run:
160151

161152
```sh
162-
curl -X POST localhost:8080/wfp/child -H 'Content-Type: application/json'
153+
sleep 25 && curl -X POST localhost:8080/wfp/child -H 'Content-Type: application/json'
163154
```
164155

165156
<!-- END_STEP -->
@@ -200,13 +191,13 @@ match_order: none
200191
output_match_mode: substring
201192
expected_stdout_lines:
202193
- '{"cleanUpTimes":5}'
203-
background: false
204-
timeout_seconds: 15
194+
background: true
195+
timeout_seconds: 60
205196
-->
206197
<!-- Timeout for above service must be more than sleep + timeout for the client-->
207198

208199
```sh
209-
curl -X POST localhost:8080/wfp/continueasnew -H 'Content-Type: application/json'
200+
sleep 30 && curl -X POST localhost:8080/wfp/continueasnew -H 'Content-Type: application/json'
210201
```
211202

212203
<!-- END_STEP -->
@@ -269,13 +260,13 @@ To start the workflow you can run:
269260
name: Start External Event Workflow
270261
match_order: none
271262
output_match_mode: substring
272-
background: false
273-
timeout_seconds: 10
263+
background: true
264+
timeout_seconds: 60
274265
-->
275266
<!-- Timeout for above service must be more than sleep + timeout for the client-->
276267

277268
```sh
278-
curl -X POST "localhost:8080/wfp/externalevent?orderId=123" -H 'Content-Type: application/json'
269+
sleep 30 && curl -X POST "localhost:8080/wfp/externalevent?orderId=123" -H 'Content-Type: application/json'
279270
```
280271

281272
<!-- END_STEP -->
@@ -299,15 +290,15 @@ match_order: none
299290
output_match_mode: substring
300291
expected_stdout_lines:
301292
- '{"approved":true}'
302-
background: false
303-
timeout_seconds: 10
293+
background: true
294+
timeout_seconds: 60
304295
-->
305296
<!-- Timeout for above service must be more than sleep + timeout for the client-->
306297

307298
To send the event you can run:
308299

309300
```sh
310-
curl -X POST "localhost:8080/wfp/externalevent-continue?orderId=123&decision=true" -H 'Content-Type: application/json'
301+
sleep 42 && curl -X POST "localhost:8080/wfp/externalevent-continue?orderId=123&decision=true" -H 'Content-Type: application/json'
311302
```
312303

313304
<!-- END_STEP -->
@@ -355,13 +346,13 @@ match_order: none
355346
output_match_mode: substring
356347
expected_stdout_lines:
357348
- '{"wordCount":60}'
358-
background: false
359-
timeout_seconds: 10
349+
background: true
350+
timeout_seconds: 60
360351
-->
361352
<!-- Timeout for above service must be more than sleep + timeout for the client-->
362353

363354
```sh
364-
curl -X POST localhost:8080/wfp/fanoutin -H 'Content-Type: application/json' -d @body.json
355+
sleep 45 && curl -X POST localhost:8080/wfp/fanoutin -H 'Content-Type: application/json' -d @body.json
365356
```
366357

367358
<!-- END_STEP -->
@@ -407,13 +398,13 @@ To start the workflow, you can run:
407398
name: Start Suspend/Resume Workflow
408399
match_order: none
409400
output_match_mode: substring
410-
background: false
411-
timeout_seconds: 10
401+
background: true
402+
timeout_seconds: 60
412403
-->
413404
<!-- Timeout for above service must be more than sleep + timeout for the client-->
414405

415406
```sh
416-
curl -X POST "localhost:8080/wfp/suspendresume?orderId=123" -H 'Content-Type: application/json'
407+
sleep 50 && curl -X POST "localhost:8080/wfp/suspendresume?orderId=456" -H 'Content-Type: application/json'
417408
```
418409

419410
<!-- END_STEP -->
@@ -440,15 +431,15 @@ match_order: none
440431
output_match_mode: substring
441432
expected_stdout_lines:
442433
- 'SUSPENDED'
443-
background: false
444-
timeout_seconds: 10
434+
background: true
435+
timeout_seconds: 60
445436
-->
446-
<!-- Timeout for above service must be more than sleep + timeout for the client-->
437+
447438

448439
Let's suspend the workflow instance by sending the following request:
449440

450441
```sh
451-
curl -X POST "localhost:8080/wfp/suspendresume/suspend?orderId=123" -H 'Content-Type: application/json'
442+
sleep 55 && curl -X POST "localhost:8080/wfp/suspendresume/suspend?orderId=456" -H 'Content-Type: application/json'
452443
```
453444

454445
<!-- END_STEP -->
@@ -468,15 +459,15 @@ match_order: none
468459
output_match_mode: substring
469460
expected_stdout_lines:
470461
- 'RUNNING'
471-
background: false
472-
timeout_seconds: 10
462+
background: true
463+
timeout_seconds: 60
473464
-->
474-
<!-- Timeout for above service must be more than sleep + timeout for the client-->
465+
475466

476467
To send the event you can run:
477468

478469
```sh
479-
curl -X POST "localhost:8080/wfp/suspendresume/resume?orderId=123" -H 'Content-Type: application/json'
470+
sleep 60 && curl -X POST "localhost:8080/wfp/suspendresume/resume?orderId=456" -H 'Content-Type: application/json'
480471
```
481472

482473
<!-- END_STEP -->
@@ -496,15 +487,15 @@ match_order: none
496487
output_match_mode: substring
497488
expected_stdout_lines:
498489
- '{"approved":true}'
499-
background: false
500-
timeout_seconds: 10
490+
background: true
491+
timeout_seconds: 60
501492
-->
502493
<!-- Timeout for above service must be more than sleep + timeout for the client-->
503494

504495
To send the event you can run:
505496

506497
```sh
507-
curl -X POST "localhost:8080/wfp/suspendresume/continue?orderId=123&decision=true" -H 'Content-Type: application/json'
498+
sleep 65 && curl -X POST "localhost:8080/wfp/suspendresume/continue?orderId=456&decision=true" -H 'Content-Type: application/json'
508499
```
509500

510501
<!-- END_STEP -->

0 commit comments

Comments
 (0)