diff --git a/app/realtime.php b/app/realtime.php index 2cb285a82..98dcd70ca 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -110,6 +110,7 @@ function getDatabase(Registry &$register, string $namespace) }; $server->onStart(function () use ($stats, $register, $containerId, &$statsDocument, $logError) { + sleep(5); // wait for the initial database schema to be ready Console::success('Server started succefully'); /** @@ -138,7 +139,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume /** * Save current connections to the Database every 5 seconds. */ - Timer::tick(5000, function () use ($register, $stats, $containerId, &$statsDocument, $logError) { + Timer::tick(5000, function () use ($register, $stats, &$statsDocument, $logError) { /** @var Document $statsDocument */ foreach ($stats as $projectId => $value) { $connections = $stats->get($projectId, 'connections') ?? 0; diff --git a/tests/e2e/Services/Realtime/RealtimeBase.php b/tests/e2e/Services/Realtime/RealtimeBase.php index 2ea7233d5..277537d40 100644 --- a/tests/e2e/Services/Realtime/RealtimeBase.php +++ b/tests/e2e/Services/Realtime/RealtimeBase.php @@ -40,9 +40,6 @@ trait RealtimeBase public function testConnectionFailureMissingChannels(): void { - /** - * Test for FAILURE - */ $client = $this->getWebsocket(); $payload = json_decode($client->receive(), true);