Skip to content

Commit 9f76c6e

Browse files
committed
fix: Partial revert dc9c0c5
1 parent 2ddd181 commit 9f76c6e

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

testing/src/Environment.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ public function startTemporalServer(
102102
$this->temporalServerProcess->setTimeout($commandTimeout);
103103
$this->temporalServerProcess->start();
104104

105-
$limit = 1_000_000;
106-
while (!$this->temporalServerProcess->isRunning() && $limit > 0) {
107-
\usleep($limit -= 1000);
105+
$deadline = \microtime(true) + 1.2;
106+
while (!$this->temporalServerProcess->isRunning() && \microtime(true) < $deadline) {
107+
\usleep(10_000);
108108
}
109109

110110
if (!$this->temporalServerProcess->isRunning()) {
@@ -132,10 +132,7 @@ public function startTemporalTestServer(int $commandTimeout = 10): void
132132
$this->temporalTestServerProcess->setTimeout($commandTimeout);
133133
$this->temporalTestServerProcess->start();
134134

135-
$limit = 1_000_000;
136-
while (!$this->temporalTestServerProcess->isRunning() && $limit > 0) {
137-
\usleep($limit -= 1000);
138-
}
135+
\sleep(1);
139136

140137
if (!$this->temporalTestServerProcess->isRunning()) {
141138
$this->output->writeln('<error>error</error>');

0 commit comments

Comments
 (0)