make tests more reproducible

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1394722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-10-05 18:49:53 +00:00
parent 0009385b5a
commit 6c9b9132d5
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}