Skip to content

Remove incorrect assertion on "processedRows" cursor stat in a test - #625

Merged
wendigo merged 3 commits into
trinodb:masterfrom
azawlocki-sbdt:azawlocki/fix-select-query-stats-test
Jul 29, 2026
Merged

Remove incorrect assertion on "processedRows" cursor stat in a test#625
wendigo merged 3 commits into
trinodb:masterfrom
azawlocki-sbdt:azawlocki/fix-select-query-stats-test

Conversation

@azawlocki-sbdt

@azawlocki-sbdt azawlocki-sbdt commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

The test test_select_quert_stats() is flaky due to an assertion that checks that the "processedRows" cursor stat is non-decreasing across responses. In fact, the stat may decrease, especially for LIMIT queries, as such queries may involve cancelling some Trino worker tasks, and the stat is computed by aggregating over active workers (verified in Trino code).

The PR replaces the incorrect assertion with one that simply checks that "processedRows" exists in the stats.

Some cases when the assertion failed:

Non-technical explanation

The PR fixes a flaky intergration test by replacing the assertion that checks a property not guaranteed by Trino by a weaker one.

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot Bot added the cla-signed label Jul 20, 2026
@azawlocki-sbdt azawlocki-sbdt changed the title Remove incorrect assertion on "processedRows" cursor star in a test Remove incorrect assertion on "processedRows" cursor stat in a test Jul 20, 2026
@azawlocki-sbdt
azawlocki-sbdt requested a review from wendigo July 29, 2026 14:22
@wendigo
wendigo merged commit b02b2ea into trinodb:master Jul 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants