Fix another TestDisiPriorityQueue bug

This commit is contained in:
Greg Miller 2022-07-22 14:13:34 -07:00
parent bd06cebfc2
commit f943a57ebe
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ public class TestDisiPriorityQueue extends LuceneTestCase {
pq.add(w);
}
} else {
if (r.nextInt(10) < 2) {
if (r.nextInt(10) < 2 && size > 1) {
int len = random().nextInt(1, size);
for (int i = 0; i < len; i++) {
pq.add(all[i]);