Skip to content

Commit 1e37c10

Browse files
authored
fix: add timeout to tests before lora to unblock (#4808)
Signed-off-by: Keiven Chang <[email protected]> Co-authored-by: Keiven Chang <[email protected]>
1 parent 4ca1679 commit 1e37c10

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/bindings/python/tests/test_kv_bindings.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ async def distributed_runtime():
3636
runtime.shutdown()
3737

3838

39-
@pytest.mark.asyncio
40-
async def test_radix_tree_binding(distributed_runtime):
39+
@pytest.mark.timeout(5) # Expected: ~1s, timeout set to 5x for safety
40+
def test_radix_tree_binding():
4141
"""Test RadixTree binding directly with store event and find matches"""
4242
import json
4343

@@ -102,13 +102,12 @@ async def test_radix_tree_binding(distributed_runtime):
102102
)
103103

104104

105-
@pytest.mark.asyncio
105+
@pytest.mark.timeout(5) # Expected: ~1s, timeout set to 5x for safety
106106
@pytest.mark.parametrize("num_threads", [2, 3, 5, 128])
107107
@pytest.mark.parametrize("prepopulate_worker_ids", [True, False])
108108
@pytest.mark.parametrize("expiration_duration_secs", [None])
109109
@pytest.mark.parametrize("is_threaded", [True, False])
110-
async def test_radix_tree_thread_safety(
111-
distributed_runtime,
110+
def test_radix_tree_thread_safety(
112111
num_threads,
113112
prepopulate_worker_ids,
114113
expiration_duration_secs,
@@ -205,6 +204,7 @@ def worker(worker_id, prepopulate_worker_ids: bool = False):
205204

206205

207206
@pytest.mark.asyncio
207+
@pytest.mark.timeout(5) # Expected: ~1s, timeout set to 5x for safety
208208
async def test_event_handler(distributed_runtime):
209209
kv_block_size = 32
210210
namespace = "kv_test"
@@ -247,6 +247,7 @@ async def test_event_handler(distributed_runtime):
247247

248248

249249
@pytest.mark.asyncio
250+
@pytest.mark.timeout(5) # Expected: ~1s, timeout set to 5x for safety
250251
async def test_approx_kv_indexer(distributed_runtime):
251252
"""Test ApproxKvIndexer with TTL-based block tracking"""
252253
kv_block_size = 32

0 commit comments

Comments
 (0)