Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

fix test bug

Michael McCandlesse5f22c7befc7
diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
index 58535160186..6f40b2ff056 100644
--- a/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
+++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
@@ -20,8 +20,6 @@ package org.apache.lucene.index;
import java.util.HashMap;
import java.util.Map;
-// nocommit fails if you repeat: TestDocValuesWithThreads.test2 -seed A765AB92D216E371
-
/**
* Access to the Field Info file that describes document fields and whether or
* not they are indexed. Each segment has a separate Field Info file. Objects
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestDocValuesWithThreads.java b/lucene/core/src/test/org/apache/lucene/index/TestDocValuesWithThreads.java
index 1c6d5c02054..ff34c225836 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestDocValuesWithThreads.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestDocValuesWithThreads.java
@@ -187,8 +187,6 @@ public class TestDocValuesWithThreads extends LuceneTestCase {
final long END_TIME = System.currentTimeMillis() + (TEST_NIGHTLY ? 30 : 1);
- final NumericDocValues docIDToID = sr.getNumericDocValues("id");
-
final int NUM_THREADS = _TestUtil.nextInt(random(), 1, 10);
Thread[] threads = new Thread[NUM_THREADS];
for(int thread=0;thread<NUM_THREADS;thread++) {
@@ -197,8 +195,10 @@ public class TestDocValuesWithThreads extends LuceneTestCase {
public void run() {
Random random = random();
final SortedDocValues stringDVDirect;
+ final NumericDocValues docIDToID;
try {
stringDVDirect = sr.getSortedDocValues("stringdv");
+ docIDToID = sr.getNumericDocValues("id");
assertNotNull(stringDVDirect);
} catch (IOException ioe) {
throw new RuntimeException(ioe);