Skip to content

Commit 0b43136

Browse files
committed
Fix DeduplicationTest to be compatible with temporal 1.2.0
1 parent 3fb450b commit 0b43136

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/Acceptance/Harness/Update/DeduplicationTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Temporal\Client\Update\UpdateOptions;
1010
use Temporal\Client\WorkflowClientInterface;
1111
use Temporal\Client\WorkflowStubInterface;
12+
use Temporal\Exception\Client\WorkflowUpdateException;
1213
use Temporal\Tests\Acceptance\App\Attribute\Stub;
1314
use Temporal\Tests\Acceptance\App\TestCase;
1415
use 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;

0 commit comments

Comments
 (0)