Fixes non-deterministic bug in C4CollectionTest related to Locale
Closes - related to
@@ -26,6 +26,7 @@ import java.nio.file.Path;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
@@ -47,6 +48,10 @@ public abstract class DocumentCollectionTest<T extends SourceDocument> extends L
public void setUp() throws Exception {
super.setUp();
+ // There's a non-deterministic bug that occurs when Arabic numerals in docids get "localized", and hence fail
+ // to match expected docids. This makes sure it doesn't happen.
+ Locale.setDefault(Locale.US);
+
segmentPaths = new HashSet<>();
segmentDocCounts = new HashMap<>();
expected = new HashMap<>();
