Skip to content

Fix intermittent AttributeError in large-result e2e row-count check - #997

Merged
mehmetcankurt merged 1 commit into
mainfrom
fix/large-result-helper-assert
Oct 23, 2026
Merged

mehmetcankurt merged 1 commit into
mainfrom
fix/large-result-helper-assert

Conversation

@mehmetcankurt

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • Bug Fix

Description

test_query_with_large_wide_result_set has been failing intermittently in the E2E Tests and Code Coverage workflow, including the merge queue (#996 needed five attempts) and #995. The failure is AttributeError: 'TestPySQLLargeWideResultSet' object has no attribute 'assertEqual'.

fetch_rows in tests/e2e/common/large_queries_mixin.py checks the row count with test_case.assertEqual, but both callers (TestPySQLLargeWideResultSet, TestPySQLLargeNarrowResultSet) inherit from PySQLPytestTestCase, a plain pytest class without unittest assertions. The check only runs when the fetch finishes within the helper's 5-minute cap, so the test passes when the fetch times out and crashes when it completes in time. This replaces it with a plain assert, so the row count is actually verified.

How is this tested?

  • E2E Tests

The change is to the e2e row-count check itself; this PR's E2E Tests and Code Coverage run exercises it against a live warehouse. Because the check rarely ran before, a genuine row-count mismatch would now surface as an assertion failure rather than being masked.

Related Tickets & Documents

This pull request and its description were written by Isaac.

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 <no-reply@databricks.com>
Signed-off-by: Mehmet Can Kurt <mehmet.cankurt@databricks.com>
@mehmetcankurt
mehmetcankurt marked this pull request as ready for review October 23, 2026 18:01

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@mehmetcankurt
mehmetcankurt added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 2689c61 Oct 23, 2026
49 of 50 checks passed

This branch was successfully deployed

1 active deployment
azure-prod — e55d7163 Deployed Oct 23, 2026 by mehmetcankurt via review #403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants