Skip to content

Commit 8e03ea6

Browse files
ai: apply changes for #1007 (1 review thread)
Addresses: - #4418928139 at tests/e2e/test_kernel_backend.py:209 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent 9e4320f commit 8e03ea6

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎tests/e2e/test_driver.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,10 @@ def _assert_rows_and_bound(self, rows, calls, arraysize):
992992
assert len(rows) == n
993993
assert [r[0] for r in rows] == list(range(n))
994994
assert all(r[1] == str(r[0]) for r in rows)
995-
bound = -(-n // arraysize) + 2
995+
# Refills are capped per server batch / CloudFetch chunk, so an exact
996+
# ceil(n/arraysize) bound is layout-dependent. Only distinguish "a few"
997+
# conversions from "~n" (one per row, issue #981).
998+
bound = n // 10
996999
assert calls <= bound, (
9971000
"row conversion called {} times for {} rows (arraysize={}); "
9981001
"expected at most {} (issue #981)".format(calls, n, arraysize, bound)

‎tests/e2e/test_kernel_backend.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ def _assert_rows_and_bound(rows, calls):
206206
assert len(rows) == _ROW_BUFFER_N
207207
assert [r[0] for r in rows] == list(range(_ROW_BUFFER_N))
208208
assert all(r[1] == str(r[0]) for r in rows)
209-
bound = -(-_ROW_BUFFER_N // _ROW_BUFFER_ARRAYSIZE) + 2
209+
# Server batch boundaries add short refills, so an exact ceil(N/arraysize)
210+
# bound is layout-dependent. Only distinguish "a few" from "~N" (issue #981).
211+
bound = _ROW_BUFFER_N // 10
210212
assert calls <= bound, (
211213
f"_convert_arrow_table called {calls} times for {_ROW_BUFFER_N} rows; "
212214
f"expected at most {bound} (issue #981)"

0 commit comments

Comments
 (0)