Skip to content

Fix flaky delete test in EsqlAsyncParsedContentChargeIT - #167256

Merged
reugn merged 4 commits into
elastic:mainfrom
reugn:fix/esql-async-charge-it-wait-for-pause
Nov 25, 2026
Merged

reugn merged 4 commits into
elastic:mainfrom
reugn:fix/esql-async-charge-it-wait-for-pause

Conversation

@reugn

@reugn reugn commented Nov 24, 2026

Copy link
Copy Markdown
Member

testChargeIsHeldUntilTheDeletedQueryStops sent the delete without waiting for the query to reach pause_me. With a 1ms wait_for_completion_timeout, the query can still be planning at that point. The cancel then stops it right away, the query releases the charge, and the assert after the delete reads 0.

This change waits on scriptWaits until the query blocks in pause_me, before the first assert and before the delete. It also waits for the async task to show as cancelled before checking the charge after the delete, so a charge dropped on cancel would fail the test.

Closes #167149

@reugn reugn added >test Issues or PRs that are addressing/adding tests Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.7.0 labels Nov 24, 2026
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@reugn
reugn merged commit 6729804 into elastic:main Nov 25, 2026
44 checks passed
@reugn
reugn deleted the fix/esql-async-charge-it-wait-for-pause branch November 25, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] EsqlAsyncParsedContentChargeIT testChargeIsHeldUntilTheDeletedQueryStops failing

3 participants