Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ dev = [
"pytest>=8.3.5",
"pytest-asyncio>=0.25.3",
"pytest-xdist>=3.5.0",
"pytest-timeout>=2.3.1",
"filelock>=3.0",
"ruff>=0.9.10",
"maturin>=1.8.2",
Expand Down Expand Up @@ -95,6 +96,7 @@ known-first-party = ["fluss"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
timeout = 30

[tool.mypy]
python_version = "3.9"
Expand Down
13 changes: 6 additions & 7 deletions bindings/python/test/test_log_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,7 @@ async def consume_scanner():
if len(collected) == 5:
break

# We must race the consumption against a timeout so the test doesn't hang if the iterator is broken
await asyncio.wait_for(consume_scanner(), timeout=10.0)
await consume_scanner()

assert len(collected) == 5, f"Expected 5 records, got {len(collected)}"

Expand Down Expand Up @@ -824,7 +823,7 @@ async def consume_and_break():
if len(collected_async) >= 3:
break

await asyncio.wait_for(consume_and_break(), timeout=10.0)
await consume_and_break()
assert len(collected_async) == 3, (
f"Expected 3 records from async for, got {len(collected_async)}"
)
Expand Down Expand Up @@ -904,7 +903,7 @@ async def consume_all():
if len(collected) >= num_records:
break

await asyncio.wait_for(consume_all(), timeout=15.0)
await consume_all()
assert len(collected) == num_records, (
f"Expected {num_records} records, got {len(collected)}"
)
Expand Down Expand Up @@ -963,7 +962,7 @@ async def consume_batches():
if total_rows >= 6:
break

await asyncio.wait_for(consume_batches(), timeout=15.0)
await consume_batches()

assert total_rows >= 6, f"Expected >=6 total rows, got {total_rows}"
assert len(collected_batches) > 0
Expand Down Expand Up @@ -1035,7 +1034,7 @@ async def consume_and_break():
first_batch = rb
break

await asyncio.wait_for(consume_and_break(), timeout=10.0)
await consume_and_break()
assert first_batch is not None, "Should have received at least 1 batch"
assert first_batch.batch.num_rows > 0

Expand Down Expand Up @@ -1096,7 +1095,7 @@ async def consume_all():
if len(all_ids) >= num_records:
break

await asyncio.wait_for(consume_all(), timeout=15.0)
await consume_all()
assert len(all_ids) >= num_records, (
f"Expected >={num_records} IDs, got {len(all_ids)}"
)
Expand Down
Loading