From 7c856a588941a1fa45104f02e25c19ac719af474 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 9 Sep 2026 17:01:58 +0100 Subject: [PATCH] test: give positive-duration build fixtures measurable runtime --- tests/e2e/Services/Functions/FunctionsCustomServerTest.php | 5 ++++- tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php | 2 ++ tests/e2e/Services/Sites/SitesCustomServerTest.php | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index dbb7615b47..3e8a7e1f5a 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -1945,7 +1945,10 @@ final class FunctionsCustomServerTest extends Scope public function testGetDeployment(): void { - $data = $this->setupTestDeployment(); + // Keep the measured build longer than Kubernetes timestamp precision. + $functionId = $this->setupDeployedFunction('Measured build', overrides: ['commands' => 'sleep 2']); + $function = $this->getFunction($functionId); + $data = ['functionId' => $functionId, 'deploymentId' => $function['body']['deploymentId']]; /** * Test for SUCCESS diff --git a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php index 0dd1910591..190aeaa9ea 100644 --- a/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php @@ -1026,6 +1026,8 @@ final class RealtimeConsoleClientTest extends Scope 'name' => 'Test', 'runtime' => 'node-22', 'entrypoint' => 'index.js', + // This lifecycle assertion requires a positive measured duration. + 'commands' => 'sleep 2', 'events' => [ 'users.*.create', 'users.*.delete', diff --git a/tests/e2e/Services/Sites/SitesCustomServerTest.php b/tests/e2e/Services/Sites/SitesCustomServerTest.php index dad85191a6..c7f62b3b99 100644 --- a/tests/e2e/Services/Sites/SitesCustomServerTest.php +++ b/tests/e2e/Services/Sites/SitesCustomServerTest.php @@ -2263,6 +2263,8 @@ final class SitesCustomServerTest extends Scope { $siteId = $this->setupSite([ 'buildRuntime' => 'node-22', + // Keep the measured build longer than Kubernetes timestamp precision. + 'buildCommand' => 'sleep 2', 'fallbackFile' => '', 'framework' => 'other', 'name' => 'Test Site',