From eb122170c7c7947f86009a75a9e0fb086d4caf08 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sun, 16 Sep 2012 20:09:02 +0000 Subject: [PATCH] ignore this test if one writer times out getting a lock git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1385363 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/TestIndexWriterWithThreads.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java index 268f952b765..1f688269fcf 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java @@ -33,6 +33,7 @@ import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.store.AlreadyClosedException; import org.apache.lucene.store.BaseDirectoryWrapper; import org.apache.lucene.store.Directory; +import org.apache.lucene.store.LockObtainFailedException; import org.apache.lucene.store.MockDirectoryWrapper; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; @@ -453,6 +454,9 @@ public class TestIndexWriterWithThreads extends LuceneTestCase { thread1.join(); thread2.join(); + assumeFalse("aborting test: timeout obtaining lock", thread1.failure instanceof LockObtainFailedException); + assumeFalse("aborting test: timeout obtaining lock", thread2.failure instanceof LockObtainFailedException); + assertFalse("Failed due to: " + thread1.failure, thread1.failed); assertFalse("Failed due to: " + thread2.failure, thread2.failed); // now verify that we have two documents in the index