From 609fad4eae57389c8cba3fff636f97be2ccfb047 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 14 Jan 2025 03:17:28 +0400 Subject: [PATCH] Sync tests behavior with Temporal CLI 1.2.0 --- tests/Acceptance/Extra/Update/UntypedStubTest.php | 6 +++++- tests/Acceptance/Extra/Workflow/AllHandlersFinishedTest.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/Acceptance/Extra/Update/UntypedStubTest.php b/tests/Acceptance/Extra/Update/UntypedStubTest.php index b04ff1b7..05ee3d21 100644 --- a/tests/Acceptance/Extra/Update/UntypedStubTest.php +++ b/tests/Acceptance/Extra/Update/UntypedStubTest.php @@ -37,7 +37,11 @@ public function fetchResolvedResultAfterWorkflowCompleted( $this->assertSame(['key' => 'resolved'], (array)$result, 'Workflow result contains resolved value'); $this->assertFalse($handle->hasResult()); - $this->assertFalse($resolver->hasResult(), 'Resolver should not have result because of wait policy'); + + // Since Temporal CLI 1.2.0, the result is available immediately after the operation + $this->assertTrue($resolver->hasResult()); + $this->assertSame('resolved', $resolver->getResult()); + // Fetch result $this->assertSame('resolved', $handle->getResult()); $this->assertTrue($handle->hasResult()); diff --git a/tests/Acceptance/Extra/Workflow/AllHandlersFinishedTest.php b/tests/Acceptance/Extra/Workflow/AllHandlersFinishedTest.php index 3238afa4..f3f5ead7 100644 --- a/tests/Acceptance/Extra/Workflow/AllHandlersFinishedTest.php +++ b/tests/Acceptance/Extra/Workflow/AllHandlersFinishedTest.php @@ -33,7 +33,11 @@ public function updateHandlersWithOneCall( $this->assertSame(['key' => 'resolved'], (array) $result, 'Workflow result contains resolved value'); $this->assertFalse($handle->hasResult()); - $this->assertFalse($resolver->hasResult(), 'Resolver should not have result because of wait policy'); + + // Since Temporal CLI 1.2.0, the result is available immediately after the operation + $this->assertTrue($resolver->hasResult()); + $this->assertSame('resolved', $resolver->getResult()); + // Fetch signal's result $this->assertSame('resolved', $handle->getResult()); $this->assertTrue($handle->hasResult());