From 3c818e5b46f58a09db1274892eab9ec553fb2adb Mon Sep 17 00:00:00 2001 From: Igor Ilic <30923996+dexters1@users.noreply.github.com> Date: Thu, 19 Jun 2025 15:22:26 +0200 Subject: [PATCH] fix: Add more timeout for server test (#1005) ## Description ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --- cognee/tests/test_cognee_server_start.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cognee/tests/test_cognee_server_start.py b/cognee/tests/test_cognee_server_start.py index dea646c48..1919bf13f 100644 --- a/cognee/tests/test_cognee_server_start.py +++ b/cognee/tests/test_cognee_server_start.py @@ -46,11 +46,11 @@ class TestCogneeServerStart(unittest.TestCase): def test_server_is_running(self): """Test that the server is running and can accept connections.""" # Test health endpoint - health_response = requests.get("http://localhost:8000/health", timeout=10) + health_response = requests.get("http://localhost:8000/health", timeout=15) self.assertEqual(health_response.status_code, 200) # Test root endpoint - root_response = requests.get("http://localhost:8000/", timeout=10) + root_response = requests.get("http://localhost:8000/", timeout=15) self.assertEqual(root_response.status_code, 200) self.assertIn("message", root_response.json()) self.assertEqual(root_response.json()["message"], "Hello, World, I am alive!") @@ -61,7 +61,7 @@ class TestCogneeServerStart(unittest.TestCase): "username": "default_user@example.com", "password": "default_password", } - login_response = requests.post(url, data=form_data, timeout=10) + login_response = requests.post(url, data=form_data, timeout=15) login_response.raise_for_status() # raises on HTTP 4xx/5xx # Define Bearer token to use for authorization @@ -83,7 +83,7 @@ class TestCogneeServerStart(unittest.TestCase): ) } - add_response = requests.post(url, headers=headers, data=form_data, files=file, timeout=15) + add_response = requests.post(url, headers=headers, data=form_data, files=file, timeout=50) add_response.raise_for_status() # raise if HTTP 4xx/5xx # Cognify request @@ -110,7 +110,7 @@ class TestCogneeServerStart(unittest.TestCase): payload = {"searchType": "GRAPH_COMPLETION", "query": "What's in the document?"} - search_response = requests.post(url, headers=headers, json=payload, timeout=15) + search_response = requests.post(url, headers=headers, json=payload, timeout=50) search_response.raise_for_status() # raises on HTTP 4xx/5xx