You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2020/10/28 16:48:42 UTC
[commons-math] 01/02: Fix flaky testGetAvailableLocales
This is an automated email from the ASF dual-hosted git repository.
erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git
commit 9a84109c7ed704a0d87c3a5c765e1f63369cb2c1
Author: Xin Tong <xi...@illinois.edu>
AuthorDate: Mon Oct 26 11:45:38 2020 -0500
Fix flaky testGetAvailableLocales
---
.../org/apache/commons/math4/complex/ComplexFormatAbstractTest.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/math4/complex/ComplexFormatAbstractTest.java b/src/test/java/org/apache/commons/math4/complex/ComplexFormatAbstractTest.java
index 61f92aa..271bdb7 100644
--- a/src/test/java/org/apache/commons/math4/complex/ComplexFormatAbstractTest.java
+++ b/src/test/java/org/apache/commons/math4/complex/ComplexFormatAbstractTest.java
@@ -21,6 +21,7 @@ import java.text.FieldPosition;
import java.text.NumberFormat;
import java.text.ParsePosition;
import java.util.Arrays;
+import java.util.HashSet;
import java.util.Locale;
import org.junit.Test;
import org.junit.Assert;
@@ -339,7 +340,9 @@ public abstract class ComplexFormatAbstractTest {
@Test
public void testGetAvailableLocales() {
- Assert.assertEquals(Arrays.asList(NumberFormat.getAvailableLocales()),Arrays.asList(ComplexFormat.getAvailableLocales()));
+ HashSet<Locale> s1 = new HashSet<>(Arrays.asList(NumberFormat.getAvailableLocales()));
+ HashSet<Locale> s2 = new HashSet<>(Arrays.asList(ComplexFormat.getAvailableLocales()));
+ Assert.assertEquals(s1,s2);
}
@Test