mirror of https://github.com/apache/lucene.git
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:
parent
f5ea01a5f4
commit
7fef7d345d
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue