|
15 | 15 | use Temporal\DataConverter\EncodedValues; |
16 | 16 | use Temporal\Exception\ExceptionInterceptorInterface; |
17 | 17 | use Temporal\Interceptor\SimplePipelineProvider; |
18 | | -use Temporal\Interceptor\WorkflowInboundCallsInterceptor; |
19 | 18 | use Temporal\Internal\Declaration\Destroyable; |
20 | 19 | use Temporal\Internal\Declaration\Prototype\WorkflowPrototype; |
21 | 20 | use Temporal\Internal\Declaration\Reader\WorkflowReader; |
@@ -76,42 +75,15 @@ public function testStartingAlreadyRunningWorkflow(): void |
76 | 75 | $workflowInfo = new WorkflowInfo(); |
77 | 76 | $workflowInfo->type->name = 'DummyWorkflow'; |
78 | 77 | $workflowInfo->execution = new WorkflowExecution('123', (string) $request->getID()); |
| 78 | + $this->services->running->add($this->createIdentifiable($request->getID())); |
79 | 79 |
|
80 | 80 | $this->marshaller->expects($this->once()) |
81 | 81 | ->method('unmarshal') |
82 | 82 | ->willReturn(new Input($workflowInfo)); |
83 | 83 |
|
84 | | - $identify = $this->createIdentifiable($request->getID()); |
| 84 | + $this->expectException(\OutOfBoundsException::class); |
85 | 85 |
|
86 | | - $this->services->running->add($identify); |
87 | | - |
88 | | - try { |
89 | | - $this->router->handle($request, [], new Deferred()); |
90 | | - } catch (\LogicException $exception) { |
91 | | - $this->fail($exception->getMessage()); |
92 | | - } |
93 | | - } |
94 | | - |
95 | | - public function testAlreadyRunningWorkflowIsReturned(): void |
96 | | - { |
97 | | - $request = new Request(Uuid::v4(), DummyWorkflow::class, EncodedValues::fromValues([])); |
98 | | - |
99 | | - $workflowInfo = new WorkflowInfo(); |
100 | | - $workflowInfo->type->name = 'DummyWorkflow'; |
101 | | - $workflowInfo->execution = new WorkflowExecution('123', (string) $request->getID()); |
102 | | - |
103 | | - $this->marshaller->expects($this->once()) |
104 | | - ->method('unmarshal') |
105 | | - ->willReturn(new Input($workflowInfo)); |
106 | | - |
107 | | - $identify = $this->createIdentifiable($request->getID()); |
108 | | - $this->services->running->add($identify); |
109 | | - |
110 | | - try { |
111 | | - $this->router->handle($request, [], new Deferred()); |
112 | | - } catch (\LogicException $exception) { |
113 | | - $this->fail($exception->getMessage()); |
114 | | - } |
| 86 | + $this->router->handle($request, [], new Deferred()); |
115 | 87 | } |
116 | 88 |
|
117 | 89 | protected function setUp(): void |
|
0 commit comments