From 884ed33b394277586c0dc8564fcf612204784d6d Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Wed, 10 Jul 2013 20:43:41 +0000 Subject: [PATCH] tests: ignore expected exceptions git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1501978 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java b/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java index c1ec8f18040..e6ce1da1ff0 100644 --- a/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java +++ b/solr/core/src/test/org/apache/solr/core/SolrCoreCheckLockOnStartupTest.java @@ -60,6 +60,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 { //creates a new IndexWriter without releasing the lock yet IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_40, null)); + ignoreException("locked"); try { //opening a new core on the same index initCore("solrconfig-simplelock.xml", "schema.xml"); @@ -67,6 +68,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 { return; fail("Expected " + LockObtainFailedException.class.getSimpleName()); } finally { + unIgnoreException("locked"); indexWriter.close(); directory.close(); deleteCore(); @@ -82,6 +84,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 { //creates a new IndexWriter without releasing the lock yet IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_40, null)); + ignoreException("locked"); try { //opening a new core on the same index initCore("solrconfig-nativelock.xml", "schema.xml"); @@ -90,6 +93,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 { return; fail("Expected " + LockObtainFailedException.class.getSimpleName()); } finally { + unIgnoreException("locked"); indexWriter.close(); directory.close(); deleteCore();