tests: ignore expected exceptions

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1501978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2013-07-10 20:43:41 +00:00
parent 020d816f42
commit 884ed33b39
1 changed files with 4 additions and 0 deletions

View File

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