Skip to content

Make TestRateLimiter locale-independent - #469

Merged
ppkarwasz merged 1 commit into
trunkfrom
fix/testratelimiter-locale
Jul 28, 2026
Merged

ppkarwasz merged 1 commit into
trunkfrom
fix/testratelimiter-locale

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

The vendored Guava TestRateLimiter in flume-ng-core formatted its expected events with the JVM default locale, so all 12 assertion-based tests failed on machines with a comma decimal separator (e.g. pl_PL), reporting R0,00 instead of R0.00.

This passes Locale.ROOT to the single String.format call in FakeStopwatch.sleepMicros, matching the fix upstream Guava applied to the same test. Verified with mvn test -Dtest=TestRateLimiter under both pl_PL.UTF-8 and en_US.UTF-8 (23/23 pass in each).

🤖 Generated with Claude Code

The vendored Guava test formatted expected events with the default
locale, so it failed on JVMs using a comma decimal separator.

Assisted-By: Claude Fable 5 <noreply@anthropic.com>
@ppkarwasz
ppkarwasz merged commit b4fcd51 into trunk Jul 28, 2026
4 checks passed
@ppkarwasz
ppkarwasz deleted the fix/testratelimiter-locale branch July 28, 2026 18:17
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.

1 participant