This is an automated email from the ASF dual-hosted git repository.

damondouglas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new f8b81211049 Fix test failure due to locale sensitivity. (#31069)
f8b81211049 is described below

commit f8b81211049e1b2c07b300e8ea283e763c5fe330
Author: Robert Bradshaw <[email protected]>
AuthorDate: Mon Apr 22 13:51:43 2024 -0700

    Fix test failure due to locale sensitivity. (#31069)
---
 .../harness/src/test/java/org/apache/beam/fn/harness/CachesTest.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/sdks/java/harness/src/test/java/org/apache/beam/fn/harness/CachesTest.java 
b/sdks/java/harness/src/test/java/org/apache/beam/fn/harness/CachesTest.java
index b004ba90508..61b62a21083 100644
--- a/sdks/java/harness/src/test/java/org/apache/beam/fn/harness/CachesTest.java
+++ b/sdks/java/harness/src/test/java/org/apache/beam/fn/harness/CachesTest.java
@@ -18,6 +18,7 @@
 package org.apache.beam.fn.harness;
 
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.anyOf;
 import static org.hamcrest.Matchers.containsString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -199,7 +200,9 @@ public class CachesTest {
     }
 
     assertThat(cache.describeStats(), containsString("used/max 600/1000 MB"));
-    assertThat(cache.describeStats(), containsString("hit 50.00%"));
+    assertThat(
+        // Locale sensitive.
+        cache.describeStats(), anyOf(containsString("hit 50.00%"), 
containsString("hit 50,00%")));
     assertThat(cache.describeStats(), containsString("lookups 200"));
     assertThat(cache.describeStats(), containsString("avg load time"));
     assertThat(cache.describeStats(), containsString("loads 100"));

Reply via email to