Skip to content

test: wait for async refresh events in testEventsAreEmitted#5022

Merged
dimas-b merged 1 commit into
apache:mainfrom
vigneshio:fix/flake-test-events-are-emitted
Jul 9, 2026
Merged

test: wait for async refresh events in testEventsAreEmitted#5022
dimas-b merged 1 commit into
apache:mainfrom
vigneshio:fix/flake-test-events-are-emitted

Conversation

@vigneshio

Copy link
Copy Markdown
Contributor

Fixes #5019.

LocalIcebergCatalogRelationalTest.testEventsAreEmitted was flaking with:

No event of type AFTER_REFRESH_TABLE recorded

Refresh events are published over the Vert.x event bus and delivered on a listener executor, so they can land after the test already called getLatest. That race showed up in CI (including on #5003).

Fixes flaky LocalIcebergCatalogRelationalTest.testEventsAreEmitted where
AFTER_REFRESH_TABLE was asserted before Vert.x event-bus delivery completed.

- Clear the test listener after setup so only property-commit refresh events
  are observed
- Await BEFORE/AFTER refresh events via Awaitility (same async path as
  production PolarisServiceBusEventDispatcher)
- Mirror the wait for view refresh events
- Add TestPolarisEventListener.hasEvent for await conditions

Fixes apache#5019

@dimas-b dimas-b left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the quick fix, @vigneshio !

@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jul 9, 2026
@dimas-b
dimas-b enabled auto-merge (squash) July 9, 2026 20:40
@dimas-b
dimas-b merged commit 9e01894 into apache:main Jul 9, 2026
25 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board Jul 9, 2026
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.

Flaky test: LocalIcebergCatalogRelationalTest.testEventsAreEmitted: No event of type AFTER_REFRESH_TABLE recorded

2 participants