File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
tests/Acceptance/Harness/Update Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 99use Temporal \Client \Update \UpdateOptions ;
1010use Temporal \Client \WorkflowClientInterface ;
1111use Temporal \Client \WorkflowStubInterface ;
12+ use Temporal \Exception \Client \WorkflowUpdateException ;
1213use Temporal \Tests \Acceptance \App \Attribute \Stub ;
1314use Temporal \Tests \Acceptance \App \TestCase ;
1415use Temporal \Workflow ;
@@ -39,8 +40,13 @@ public function check(
3940 self ::assertSame (1 , $ handle1 ->getResult (1 ));
4041 self ::assertSame (1 , $ handle2 ->getResult (1 ));
4142
42- # This only needs to start to unblock the workflow
43- $ stub ->startUpdate ('my_update ' );
43+ try {
44+ # This only needs to start to unblock the workflow
45+ $ stub ->startUpdate ('my_update ' );
46+ } catch (WorkflowUpdateException ) {
47+ # Workflow Update failed because the Workflow completed before the Update completed
48+ # It's OK in this case
49+ }
4450
4551 # There should be two accepted updates, and only one of them should be completed with the set id
4652 $ totalUpdates = 0 ;
You can’t perform that action at this time.
0 commit comments