Skip to content

Commit

Permalink
Fixes non-deterministic bug in C4CollectionTest related to Locale (#1505
Browse files Browse the repository at this point in the history
)

Closes #1504 - related to #1199
  • Loading branch information
lintool committed Apr 5, 2021
1 parent a2cfe15 commit 827fd0d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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;
Expand All @@ -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<>();
Expand Down

0 comments on commit 827fd0d

Please sign in to comment.