From e7aba5b35d8c55553e27e27b5fd97f0de02560b5 Mon Sep 17 00:00:00 2001 From: Swapna Lekkala Date: Fri, 3 Oct 2025 15:45:49 -0700 Subject: [PATCH] fix time issue with cancel test --- tests/integration/vector_io/test_openai_vector_stores.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/integration/vector_io/test_openai_vector_stores.py b/tests/integration/vector_io/test_openai_vector_stores.py index 7d97a3bfb..88b97cf39 100644 --- a/tests/integration/vector_io/test_openai_vector_stores.py +++ b/tests/integration/vector_io/test_openai_vector_stores.py @@ -1049,12 +1049,10 @@ def test_openai_vector_store_file_batch_cancel(compat_client_with_empty_stores, # Create a vector store vector_store = compat_client.vector_stores.create(name="batch_cancel_test_store") - # Create a larger batch to ensure we have time to cancel before completion + # Create a large batch to ensure we have time to cancel before completion file_ids = [] - for i in range(50): # Large batch to slow down processing - with BytesIO( - f"This is batch cancel test file {i} with more content to process slowly".encode() * 100 - ) as file_buffer: + for i in range(100): # Large batch that will take time to process + with BytesIO(f"This is batch cancel test file {i} with substantial content".encode()) as file_buffer: file_buffer.name = f"batch_cancel_test_{i}.txt" file = compat_client.files.create(file=file_buffer, purpose="assistants") file_ids.append(file.id)