mirror of https://github.com/apache/lucene.git
fix intermittent thread-safety failure in contrib/benchmark unit test
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@602475 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b0d2b1c90e
commit
86ca6f86d7
|
@ -347,7 +347,7 @@ public class TestPerfTasksLogic extends TestCase {
|
||||||
/** use reuters and the exhaust mechanism, but to be faster, add 20 docs only... */
|
/** use reuters and the exhaust mechanism, but to be faster, add 20 docs only... */
|
||||||
public static class Reuters20DocMaker extends ReutersDocMaker {
|
public static class Reuters20DocMaker extends ReutersDocMaker {
|
||||||
private int nDocs=0;
|
private int nDocs=0;
|
||||||
protected DocData getNextDocData() throws Exception {
|
protected synchronized DocData getNextDocData() throws Exception {
|
||||||
if (nDocs>=20 && !forever) {
|
if (nDocs>=20 && !forever) {
|
||||||
throw new NoMoreDataException();
|
throw new NoMoreDataException();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue