@@ -355,7 +355,7 @@ public void deleteSync() {
355
355
}
356
356
357
357
@ Nested
358
- @ DisplayName ("Test which without a long running child workflow" )
358
+ @ DisplayName ("Test which with a long running child workflow" )
359
359
class SynchronousWorkflow {
360
360
361
361
@ BeforeEach
@@ -399,14 +399,14 @@ public void manualRun() {
399
399
WorkflowClient .start (workflow ::run , input );
400
400
testEnv .sleep (Duration .ofMinutes (2L ));
401
401
workflow .submitManualSync ();
402
+ testEnv .shutdown ();
402
403
403
404
final Queue <ChangedStateEvent > events = testStateListener .events (testId );
404
405
405
406
Assertions .assertThat (events )
406
407
.filteredOn (changedStateEvent -> changedStateEvent .getField () == StateField .SKIPPED_SCHEDULING && changedStateEvent .isValue ())
407
408
.isEmpty ();
408
409
409
- testEnv .shutdown ();
410
410
}
411
411
412
412
@ Test
@@ -428,9 +428,10 @@ public void cancelRunning() {
428
428
429
429
WorkflowClient .start (workflow ::run , input );
430
430
workflow .submitManualSync ();
431
- testEnv .sleep (Duration .ofSeconds (30L ));
431
+ testEnv .sleep (Duration .ofSeconds (10L ));
432
432
workflow .cancelJob ();
433
- testEnv .sleep (Duration .ofMinutes (1L ));
433
+ testEnv .sleep (Duration .ofMinutes (2L ));
434
+ testEnv .shutdown ();
434
435
435
436
final Queue <ChangedStateEvent > events = testStateListener .events (testId );
436
437
@@ -439,8 +440,6 @@ public void cancelRunning() {
439
440
.hasSizeGreaterThanOrEqualTo (1 );
440
441
441
442
Mockito .verify (mJobCreationAndStatusUpdateActivity ).jobCancelled (Mockito .any ());
442
-
443
- testEnv .shutdown ();
444
443
}
445
444
446
445
@ Test
@@ -464,6 +463,7 @@ public void resetStart() {
464
463
testEnv .sleep (Duration .ofSeconds (30L ));
465
464
workflow .resetConnection ();
466
465
testEnv .sleep (Duration .ofSeconds (90L ));
466
+ testEnv .shutdown ();
467
467
468
468
final Queue <ChangedStateEvent > events = testStateListener .events (testId );
469
469
@@ -473,7 +473,6 @@ public void resetStart() {
473
473
474
474
Mockito .verify (mJobCreationAndStatusUpdateActivity ).jobSuccess (Mockito .any ());
475
475
476
- testEnv .shutdown ();
477
476
}
478
477
479
478
@ Test
@@ -497,7 +496,8 @@ public void resetCancelRunningWorkflow() {
497
496
workflow .submitManualSync ();
498
497
testEnv .sleep (Duration .ofSeconds (30L ));
499
498
workflow .resetConnection ();
500
- testEnv .sleep (Duration .ofSeconds (30L ));
499
+ testEnv .sleep (Duration .ofMinutes (2L ));
500
+ testEnv .shutdown ();
501
501
502
502
final Queue <ChangedStateEvent > events = testStateListener .events (testId );
503
503
@@ -507,7 +507,6 @@ public void resetCancelRunningWorkflow() {
507
507
508
508
Mockito .verify (mJobCreationAndStatusUpdateActivity ).jobCancelled (Mockito .any ());
509
509
510
- testEnv .shutdown ();
511
510
}
512
511
513
512
@ Test
0 commit comments