From 2c3cfd11ff454dd399983186724aaf5d1441302e Mon Sep 17 00:00:00 2001 From: Mish Ushakov <10400064+mishushakov@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:35:48 +0200 Subject: [PATCH 1/2] fix: increase background build test timeouts to reduce flakiness The 10s timeout was too tight for the 2+ API roundtrips (requestBuild + triggerBuild) that buildInBackground makes before returning, causing frequent timeouts in CI especially on Production environments. Co-Authored-By: Claude Opus 4.6 --- packages/js-sdk/tests/template/backgroundBuild.test.ts | 2 +- .../tests/async/template_async/test_background_build.py | 2 +- .../tests/sync/template_sync/test_background_build.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/js-sdk/tests/template/backgroundBuild.test.ts b/packages/js-sdk/tests/template/backgroundBuild.test.ts index 0e798b47cd..b47d0c5092 100644 --- a/packages/js-sdk/tests/template/backgroundBuild.test.ts +++ b/packages/js-sdk/tests/template/backgroundBuild.test.ts @@ -22,4 +22,4 @@ test('build template in background', async () => { // Verify the build is actually running const status = await Template.getBuildStatus(buildInfo) expect(status.status).toEqual('building') -}, 10_000) +}, 30_000) diff --git a/packages/python-sdk/tests/async/template_async/test_background_build.py b/packages/python-sdk/tests/async/template_async/test_background_build.py index 16690c7232..6f92abfce3 100644 --- a/packages/python-sdk/tests/async/template_async/test_background_build.py +++ b/packages/python-sdk/tests/async/template_async/test_background_build.py @@ -6,7 +6,7 @@ @pytest.mark.skip_debug() -@pytest.mark.timeout(10) +@pytest.mark.timeout(30) async def test_build_in_background_should_start_build_and_return_info(): """Test that build_in_background returns immediately without waiting for build to complete.""" template = ( diff --git a/packages/python-sdk/tests/sync/template_sync/test_background_build.py b/packages/python-sdk/tests/sync/template_sync/test_background_build.py index f5d41db4e4..af3c6cc6de 100644 --- a/packages/python-sdk/tests/sync/template_sync/test_background_build.py +++ b/packages/python-sdk/tests/sync/template_sync/test_background_build.py @@ -6,7 +6,7 @@ @pytest.mark.skip_debug() -@pytest.mark.timeout(10) +@pytest.mark.timeout(30) def test_build_in_background_should_start_build_and_return_info(): """Test that build_in_background returns immediately without waiting for build to complete.""" template = ( From cd65c0c741fb8842cc0dbca0410fcde806813f67 Mon Sep 17 00:00:00 2001 From: Mish Ushakov <10400064+mishushakov@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:42:46 +0200 Subject: [PATCH 2/2] fix: align background build test timeouts with other template tests Use 180s like other template tests instead of a custom short timeout. Python tests now inherit the 180s default from conftest.py instead of overriding it. Co-Authored-By: Claude Opus 4.6 --- packages/js-sdk/tests/template/backgroundBuild.test.ts | 2 +- .../tests/async/template_async/test_background_build.py | 1 - .../tests/sync/template_sync/test_background_build.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/js-sdk/tests/template/backgroundBuild.test.ts b/packages/js-sdk/tests/template/backgroundBuild.test.ts index b47d0c5092..b7c4cf2f7f 100644 --- a/packages/js-sdk/tests/template/backgroundBuild.test.ts +++ b/packages/js-sdk/tests/template/backgroundBuild.test.ts @@ -22,4 +22,4 @@ test('build template in background', async () => { // Verify the build is actually running const status = await Template.getBuildStatus(buildInfo) expect(status.status).toEqual('building') -}, 30_000) +}, 180_000) diff --git a/packages/python-sdk/tests/async/template_async/test_background_build.py b/packages/python-sdk/tests/async/template_async/test_background_build.py index 6f92abfce3..3743f85b9d 100644 --- a/packages/python-sdk/tests/async/template_async/test_background_build.py +++ b/packages/python-sdk/tests/async/template_async/test_background_build.py @@ -6,7 +6,6 @@ @pytest.mark.skip_debug() -@pytest.mark.timeout(30) async def test_build_in_background_should_start_build_and_return_info(): """Test that build_in_background returns immediately without waiting for build to complete.""" template = ( diff --git a/packages/python-sdk/tests/sync/template_sync/test_background_build.py b/packages/python-sdk/tests/sync/template_sync/test_background_build.py index af3c6cc6de..a991fe437d 100644 --- a/packages/python-sdk/tests/sync/template_sync/test_background_build.py +++ b/packages/python-sdk/tests/sync/template_sync/test_background_build.py @@ -6,7 +6,6 @@ @pytest.mark.skip_debug() -@pytest.mark.timeout(30) def test_build_in_background_should_start_build_and_return_info(): """Test that build_in_background returns immediately without waiting for build to complete.""" template = (