Skip to content

Fix flaky Iceberg snapshot trigger tests under CI thread-pool latency - #71825

Merged
Lee-W merged 1 commit into
apache:mainfrom
astronomer:fix-iceberg-trigger-test-timeout
Aug 20, 2026
Merged

Fix flaky Iceberg snapshot trigger tests under CI thread-pool latency#71825
Lee-W merged 1 commit into
apache:mainfrom
astronomer:fix-iceberg-trigger-test-timeout

Conversation

@Lee-W

@Lee-W Lee-W commented Aug 19, 2026

Copy link
Copy Markdown
Member

Why

Two tests for the newly added IcebergTableSnapshotTrigger (#71387) collect 2 events via _collect(trigger, 2), whose default 1s wall-clock budget is too tight given the real asyncio.to_thread scheduling each polling round performs (head-snapshot lookup, plus asset-state-store get/set). Under CI's constrained/parallel runners, thread-pool scheduling latency occasionally pushes the total past 1s, so the collector times out before both events
arrive and the assertion fails on an incomplete payload list.

Observed failing on unrelated PRs:

What

Widens the collection timeout to 3s for just these two tests. The trigger
implementation itself is correct — a single sequential loop with no
concurrency, so the emitted order is deterministic; this is purely a test
budget issue.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Sonnet 5)

Generated-by: Claude Code (Sonnet 5) following the guidelines

test_emits_once_per_new_snapshot and test_persists_the_watermark_on_each_event
collect 2 events, each requiring several real asyncio.to_thread calls (head
lookup plus asset-state-store get/set). The default 1s collection budget in
_collect() is tight enough that CI's thread-pool scheduling latency
occasionally causes the tests to time out before both events arrive, failing
the assertion on an incomplete payload list.
@Lee-W
Lee-W merged commit 7f524b4 into apache:main Aug 20, 2026
78 checks passed
@Lee-W
Lee-W deleted the fix-iceberg-trigger-test-timeout branch August 20, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants