mirror of https://github.com/apache/lucene.git
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:
parent
020d816f42
commit
884ed33b39
|
@ -60,6 +60,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 {
|
||||||
//creates a new IndexWriter without releasing the lock yet
|
//creates a new IndexWriter without releasing the lock yet
|
||||||
IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_40, null));
|
IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_40, null));
|
||||||
|
|
||||||
|
ignoreException("locked");
|
||||||
try {
|
try {
|
||||||
//opening a new core on the same index
|
//opening a new core on the same index
|
||||||
initCore("solrconfig-simplelock.xml", "schema.xml");
|
initCore("solrconfig-simplelock.xml", "schema.xml");
|
||||||
|
@ -67,6 +68,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 {
|
||||||
return;
|
return;
|
||||||
fail("Expected " + LockObtainFailedException.class.getSimpleName());
|
fail("Expected " + LockObtainFailedException.class.getSimpleName());
|
||||||
} finally {
|
} finally {
|
||||||
|
unIgnoreException("locked");
|
||||||
indexWriter.close();
|
indexWriter.close();
|
||||||
directory.close();
|
directory.close();
|
||||||
deleteCore();
|
deleteCore();
|
||||||
|
@ -82,6 +84,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 {
|
||||||
//creates a new IndexWriter without releasing the lock yet
|
//creates a new IndexWriter without releasing the lock yet
|
||||||
IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_40, null));
|
IndexWriter indexWriter = new IndexWriter(directory, new IndexWriterConfig(Version.LUCENE_40, null));
|
||||||
|
|
||||||
|
ignoreException("locked");
|
||||||
try {
|
try {
|
||||||
//opening a new core on the same index
|
//opening a new core on the same index
|
||||||
initCore("solrconfig-nativelock.xml", "schema.xml");
|
initCore("solrconfig-nativelock.xml", "schema.xml");
|
||||||
|
@ -90,6 +93,7 @@ public class SolrCoreCheckLockOnStartupTest extends SolrTestCaseJ4 {
|
||||||
return;
|
return;
|
||||||
fail("Expected " + LockObtainFailedException.class.getSimpleName());
|
fail("Expected " + LockObtainFailedException.class.getSimpleName());
|
||||||
} finally {
|
} finally {
|
||||||
|
unIgnoreException("locked");
|
||||||
indexWriter.close();
|
indexWriter.close();
|
||||||
directory.close();
|
directory.close();
|
||||||
deleteCore();
|
deleteCore();
|
||||||
|
|
Loading…
Reference in New Issue