Repository navigation
Fix intermittent AttributeError in large-result e2e row-count check - #997
Merged
Merged
Conversation
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>
vuanhphung
approved these changes
Oct 23, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Description
test_query_with_large_wide_result_sethas been failing intermittently in the E2E Tests and Code Coverage workflow, including the merge queue (#996 needed five attempts) and #995. The failure isAttributeError: 'TestPySQLLargeWideResultSet' object has no attribute 'assertEqual'.fetch_rowsintests/e2e/common/large_queries_mixin.pychecks the row count withtest_case.assertEqual, but both callers (TestPySQLLargeWideResultSet,TestPySQLLargeNarrowResultSet) inherit fromPySQLPytestTestCase, 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 plainassert, so the row count is actually verified.How is this tested?
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
ArrowInvalid: Can't unify schema with duplicate field namessince 4.2.6 (#989) #995 (both attempts of test-with-coverage) and in the ci: upgrade bot engine runtime #996 merge-queue runs.This pull request and its description were written by Isaac.