diff --git a/tests/test_document_rag.py b/tests/test_document_rag.py index ddd0bfd..1ced053 100644 --- a/tests/test_document_rag.py +++ b/tests/test_document_rag.py @@ -9,6 +9,7 @@ import tempfile from pathlib import Path import pytest +from test_timeout import ci_timeout @pytest.fixture @@ -59,8 +60,9 @@ def test_document_rag_simulated(test_data_dir): @pytest.mark.skipif(not os.environ.get("OPENAI_API_KEY"), reason="OpenAI API key not available") @pytest.mark.skipif( - os.environ.get("CI") == "true", reason="Skip OpenAI tests in CI to avoid API costs" + os.environ.get("CI") == "true", reason="Skip OpenAI embedding tests in CI to avoid hanging" ) +@ci_timeout(60) # 60 second timeout to avoid hanging on OpenAI API calls def test_document_rag_openai(test_data_dir): """Test document_rag with OpenAI embeddings.""" with tempfile.TemporaryDirectory() as temp_dir: