From 7b2b174ab2271d828e96e124f9a59c3f858724e4 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 2 Oct 2025 13:40:42 +1000 Subject: [PATCH] Bump required query time for testing (#10451) Note: In "real life" the query does not take this long --- src/backend/InvenTree/build/test_api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/InvenTree/build/test_api.py b/src/backend/InvenTree/build/test_api.py index 5fd6692996..e18621d223 100644 --- a/src/backend/InvenTree/build/test_api.py +++ b/src/backend/InvenTree/build/test_api.py @@ -1421,17 +1421,19 @@ class BuildLineTests(BuildAPITest): for line in lines: StockItem.objects.create(part=line.bom_item.sub_part, quantity=60) + # TODO: 2025-10-02: Work out why this query takes so long with PostgreSQL (in CI) # Note: The max_query_time is bumped up here, as postgresql backend has some strange issues (only during testing) response = self.get( - url, {'build': build.pk, 'available': True}, max_query_time=15 + url, {'build': build.pk, 'available': True}, max_query_time=30 ) # We expect 2 lines to have "available" stock self.assertEqual(len(response.data), 2) + # TODO: 2025-10-02: Work out why this query takes so long with PostgreSQL (in CI) # Note: The max_query_time is bumped up here, as postgresql backend has some strange issues (only during testing) response = self.get( - url, {'build': build.pk, 'available': False}, max_query_time=15 + url, {'build': build.pk, 'available': False}, max_query_time=30 ) self.assertEqual(len(response.data), 1)