Fix test bug.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457676 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrien Grand 2013-03-18 09:10:19 +00:00
parent 6c1f180ebb
commit ffabbc9dda
1 changed files with 5 additions and 3 deletions

View File

@ -111,9 +111,11 @@ public class TestSorterTemplate extends LuceneTestCase {
}
int randomLength() {
return random().nextBoolean()
? random().nextInt(SLOW_SORT_THRESHOLD)
: random().nextInt(100000);
return _TestUtil.nextInt(random(), 1, random().nextBoolean() ? SLOW_SORT_THRESHOLD : 100000);
}
public void testEmpty() {
testSort(new int[0]);
}
public void testAscending() {