Skip to content

Apache Lucene open-source search software

make tests more reproducible

Robert Muir6c9b9132d5ba
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java b/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java
index 1ea95e12cca..5afce7ba71c 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/AlcoholicMergePolicy.java
@@ -47,6 +47,7 @@ public class AlcoholicMergePolicy extends LogMergePolicy {
public AlcoholicMergePolicy(TimeZone tz, Random random) {
this.calendar = new GregorianCalendar(tz, Locale.ROOT);
+ calendar.setTimeInMillis(_TestUtil.nextLong(random, 0, Long.MAX_VALUE));
this.random = random;
maxMergeSize = _TestUtil.nextInt(random, 1024*1024, Integer.MAX_VALUE);
}