Skip to content

[test] Fix flaky CoordinatorEventManagerTest by isolating metric group instance#3252

Merged
swuferhong merged 1 commit intoapache:mainfrom
swuferhong:fix-unstable-tests
May 6, 2026
Merged

[test] Fix flaky CoordinatorEventManagerTest by isolating metric group instance#3252
swuferhong merged 1 commit intoapache:mainfrom
swuferhong:fix-unstable-tests

Conversation

@swuferhong
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #3245

Shared static TestingMetricGroups.COORDINATOR_METRICS instance causes gauge name collision across tests: AbstractMetricGroup.addMetric() rejects new gauges when a same-name gauge already exists (keeps the old one), so the test reads a stale gauge bound to a different CoordinatorEventManager instance.

Brief change log

Tests

API and Format

Documentation

@swuferhong
Copy link
Copy Markdown
Contributor Author

Hi @wuchong, @vamossagar12. Could you take a look on this hotfix, thx.

Copy link
Copy Markdown
Contributor

@loserwang1024 loserwang1024 left a comment

Choose a reason for hiding this comment

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

LGTM

@swuferhong swuferhong merged commit c7878e8 into apache:main May 6, 2026
7 checks passed
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.

[test] Unstable test CoordinatorEventManagerTest.testMetricsUpdatedImmediatelyOnStartup

3 participants