fix infinite loop in test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1145457 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-07-12 05:06:51 +00:00
parent f5ea01a5f4
commit 7fef7d345d
1 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,7 @@ public class TestNumericQueryParser extends LuceneTestCase {
static void init() {
try {
LOCALE = randomLocale(random);
LOCALE = Locale.getDefault();
TIMEZONE = randomTimeZone(random);
DATE_STYLE = randomDateStyle(random);
TIME_STYLE = randomDateStyle(random);
@ -91,7 +92,7 @@ public class TestNumericQueryParser extends LuceneTestCase {
NUMBER_FORMAT.setMaximumFractionDigits((random.nextInt() & 20) + 1);
NUMBER_FORMAT.setMinimumFractionDigits((random.nextInt() & 20) + 1);
NUMBER_FORMAT.setMaximumIntegerDigits((random.nextInt() & 20) + 1);
NUMBER_FORMAT.setMinimumIntegerDigits((random.nextInt() & 20) + 1);
NUMBER_FORMAT.setMinimumIntegerDigits((random.nextInt() & 20) + 4); // the loop checks for < 1000, this is a must!
// assumes localized date pattern will have at least year, month, day, hour, minute
SimpleDateFormat dateFormat = (SimpleDateFormat) DateFormat.getDateTimeInstance(