mirror of https://github.com/apache/lucene.git
LUCENE-6271: fix LineFileDocs to not close itself; don't set daemon threads for ThreadedIndexingAndSearchingTestCase
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene6271@1670511 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd0c69cac5
commit
10565e237d
|
@ -309,7 +309,6 @@ public abstract class ThreadedIndexingAndSearchingTestCase extends LuceneTestCas
|
|||
doAfterIndexingThreadDone();
|
||||
}
|
||||
};
|
||||
threads[thread].setDaemon(true);
|
||||
threads[thread].start();
|
||||
}
|
||||
|
||||
|
@ -399,7 +398,6 @@ public abstract class ThreadedIndexingAndSearchingTestCase extends LuceneTestCas
|
|||
}
|
||||
}
|
||||
};
|
||||
searchThreads[thread].setDaemon(true);
|
||||
searchThreads[thread].start();
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,8 @@ public class LineFileDocs implements Closeable {
|
|||
}
|
||||
|
||||
public synchronized void reset(Random random) throws IOException {
|
||||
close();
|
||||
reader.close();
|
||||
reader = null;
|
||||
open(random);
|
||||
id.set(0);
|
||||
}
|
||||
|
@ -215,7 +216,8 @@ public class LineFileDocs implements Closeable {
|
|||
if (LuceneTestCase.VERBOSE) {
|
||||
System.out.println("TEST: LineFileDocs: now rewind file...");
|
||||
}
|
||||
close();
|
||||
reader.close();
|
||||
reader = null;
|
||||
open(null);
|
||||
line = reader.readLine();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue