Skip to content

Commit 799a1a8

Browse files
authored
test: remove unused TemporalStarter dependency from DeploymentTest causing temporal server reboot (#730)
1 parent d1dd2ae commit 799a1a8

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

testing/src/Environment.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ public function executeTemporalCommand(array|string $command, int $timeout = 10)
256256

257257
$process = new Process($command);
258258
$process->setTimeout($timeout);
259+
260+
$this->io->info('Executing Temporal Command: ' . $this->serializeProcess($process));
261+
259262
$process->run();
260263
}
261264

@@ -304,7 +307,7 @@ public function isTemporalTestRunning(): bool
304307
return $this->temporalTestServerProcess?->isRunning() === true;
305308
}
306309

307-
private function serializeProcess(?Process $temporalServerProcess): string|array
310+
private function serializeProcess(?Process $temporalServerProcess): string
308311
{
309312
$reflection = new \ReflectionClass($temporalServerProcess);
310313
$reflectionProperty = $reflection->getProperty('commandline');

tests/Acceptance/Extra/Versioning/DeploymentTest.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ class DeploymentTest extends TestCase
3030
public function defaultBehaviorAuto(
3131
Environment $environment,
3232
RRStarter $roadRunnerStarter,
33-
TemporalStarter $starter,
3433
WorkflowClientInterface $client,
3534
Feature $feature,
3635
): void {
3736
$behavior = self::executeWorkflow(
3837
$environment,
3938
$roadRunnerStarter,
40-
$starter,
4139
$client,
4240
$feature,
4341
/** @see DefaultWorkflow */
@@ -51,15 +49,13 @@ public function defaultBehaviorAuto(
5149
public function customBehaviorPinned(
5250
Environment $environment,
5351
RRStarter $roadRunnerStarter,
54-
TemporalStarter $starter,
5552
WorkflowClientInterface $client,
5653
Feature $feature,
5754
): void {
5855
$id = Uuid::v4();
5956
self::executeWorkflow(
6057
$environment,
6158
$roadRunnerStarter,
62-
$starter,
6359
$client,
6460
$feature,
6561
/** @see PinnedWorkflow */
@@ -86,15 +82,13 @@ public function customBehaviorPinned(
8682
public function versionBehaviorOverrideAutoUpgrade(
8783
Environment $environment,
8884
RRStarter $roadRunnerStarter,
89-
TemporalStarter $starter,
9085
WorkflowClientInterface $client,
9186
Feature $feature,
9287
): void {
9388
$id = Uuid::v4();
9489
self::executeWorkflow(
9590
$environment,
9691
$roadRunnerStarter,
97-
$starter,
9892
$client,
9993
$feature,
10094
/** @see PinnedWorkflow */
@@ -121,14 +115,12 @@ public function versionBehaviorOverrideAutoUpgrade(
121115
public function versionBehaviorOverridePinned(
122116
Environment $environment,
123117
RRStarter $roadRunnerStarter,
124-
TemporalStarter $starter,
125118
WorkflowClientInterface $client,
126119
Feature $feature,
127120
): void {
128121
$behavior = self::executeWorkflow(
129122
$environment,
130123
$roadRunnerStarter,
131-
$starter,
132124
$client,
133125
$feature,
134126
/** @see PinnedWorkflow */
@@ -151,7 +143,6 @@ public function versionBehaviorOverridePinned(
151143
private static function executeWorkflow(
152144
Environment $environment,
153145
RRStarter $roadRunnerStarter,
154-
TemporalStarter $temporalStarter,
155146
WorkflowClientInterface $client,
156147
Feature $feature,
157148
string $workflowType,
@@ -200,8 +191,7 @@ private static function executeWorkflow(
200191
$postAction === null or $postAction($behavior);
201192
return $behavior;
202193
} finally {
203-
$temporalStarter->stop();
204-
$temporalStarter->start();
194+
$roadRunnerStarter->stop();
205195
$roadRunnerStarter->start();
206196
}
207197
}

0 commit comments

Comments
 (0)