mirror of https://github.com/apache/lucene.git
fix testcase to not check unreliable thread state in join helper
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1340794 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8945e4b2ce
commit
5c714e8147
|
@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import org.apache.lucene.index.DocumentsWriterStallControl.MemoryController;
|
import org.apache.lucene.index.DocumentsWriterStallControl.MemoryController;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
|
|
||||||
import com.carrotsearch.randomizedtesting.annotations.Repeat;
|
|
||||||
import com.carrotsearch.randomizedtesting.annotations.ThreadLeaks;
|
import com.carrotsearch.randomizedtesting.annotations.ThreadLeaks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +58,7 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
memCtrl.netBytes = 50;
|
memCtrl.netBytes = 50;
|
||||||
ctrl.updateStalled(memCtrl);
|
ctrl.updateStalled(memCtrl);
|
||||||
assertFalse(ctrl.anyStalledThreads());
|
assertFalse(ctrl.anyStalledThreads());
|
||||||
join(waitThreads, 100);
|
join(waitThreads, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRandom() throws InterruptedException {
|
public void testRandom() throws InterruptedException {
|
||||||
|
@ -297,8 +296,6 @@ public class TestDocumentsWriterStallControl extends LuceneTestCase {
|
||||||
throws InterruptedException {
|
throws InterruptedException {
|
||||||
for (Thread thread : toJoin) {
|
for (Thread thread : toJoin) {
|
||||||
thread.join(timeout);
|
thread.join(timeout);
|
||||||
assertEquals(thread.getState().toString(), Thread.State.TERMINATED,
|
|
||||||
thread.getState());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue