Skip to content

Commit 208c876

Browse files
committed
Test non-positive number of tickets throws
1 parent d614ad9 commit 208c876

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

python/rapidsmpf/rapidsmpf/tests/streaming/test_read_parquet.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,16 @@ def test_read_parquet(
100100
plc.DataType(plc.TypeId.BOOL8),
101101
)
102102
assert all_equal.to_py()
103+
104+
105+
@pytest.mark.parametrize("num_tickets", [-1, 0])
106+
def test_read_parquet_non_positive_throttle_throws(
107+
context: Context, source: plc.io.SourceInfo, num_tickets: int
108+
) -> None:
109+
ch = Channel[TableChunk]()
110+
options = plc.io.parquet.ParquetReaderOptions.builder(source).build()
111+
112+
producer = read_parquet(context, ch, num_tickets, options, 100)
113+
114+
with pytest.raises(RuntimeError):
115+
run_streaming_pipeline(nodes=[producer])

0 commit comments

Comments
 (0)