This is an automated email from the ASF dual-hosted git repository. ppkarwasz pushed a commit to branch fix/testratelimiter-locale in repository https://gitbox.apache.org/repos/asf/logging-flume.git
commit ab880c1044470c7a95fe1541827b0a95134c7522 Author: Piotr P. Karwasz <[email protected]> AuthorDate: Fri Jul 24 16:12:56 2026 +0200 Make TestRateLimiter locale-independent 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 <[email protected]> --- .../java/org/apache/flume/source/shaded/guava/TestRateLimiter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flume-ng-core/src/test/java/org/apache/flume/source/shaded/guava/TestRateLimiter.java b/flume-ng-core/src/test/java/org/apache/flume/source/shaded/guava/TestRateLimiter.java index ac0ea41d..3899cf0b 100644 --- a/flume-ng-core/src/test/java/org/apache/flume/source/shaded/guava/TestRateLimiter.java +++ b/flume-ng-core/src/test/java/org/apache/flume/source/shaded/guava/TestRateLimiter.java @@ -23,6 +23,7 @@ import static java.util.concurrent.TimeUnit.SECONDS; import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List; +import java.util.Locale; import java.util.Random; import junit.framework.TestCase; import org.apache.flume.source.shaded.guava.RateLimiter.SleepingStopwatch; @@ -428,7 +429,7 @@ public class TestRateLimiter extends TestCase { void sleepMicros(String caption, long micros) { instant += MICROSECONDS.toNanos(micros); - events.add(caption + String.format("%3.2f", (micros / 1000000.0))); + events.add(caption + String.format(Locale.ROOT, "%3.2f", (micros / 1000000.0))); } @Override
