From e55d716302dd931d68d173c230fa80ebe5561818 Mon Sep 17 00:00:00 2001 From: Mehmet Can Kurt Date: Fri, 23 Oct 2026 17:23:18 +0000 Subject: [PATCH] Use plain assert for row-count check in large-result e2e helper fetch_rows called test_case.assertEqual, but its callers are plain pytest classes without unittest assertions. The check only runs when the fetch finishes inside the 5-minute cap, so it crashed intermittently with AttributeError instead of verifying the row count. Co-authored-by: Isaac Signed-off-by: Mehmet Can Kurt --- tests/e2e/common/large_queries_mixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/common/large_queries_mixin.py b/tests/e2e/common/large_queries_mixin.py index 7255ee095..35df14246 100644 --- a/tests/e2e/common/large_queries_mixin.py +++ b/tests/e2e/common/large_queries_mixin.py @@ -24,7 +24,7 @@ def fetch_rows(test_case, cursor, row_count, fetchmany_size): rows = _get_some_rows(cursor, fetchmany_size) if not rows: # Read all the rows, row_count should match - test_case.assertEqual(n, row_count) + assert n == row_count, "fetched {} rows, expected {}".format(n, row_count) num_fetches = max(math.ceil(n / 10000), 1) latency_ms = int((time.time() - start_time) * 1000 / num_fetches), 1