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:
Michael McCandless 2015-03-31 22:55:54 +00:00
parent dd0c69cac5
commit 10565e237d
2 changed files with 4 additions and 4 deletions

View File

@ -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();
}

View File

@ -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();
}