tests: ignore expected exceptions

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@926670 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-23 17:15:20 +00:00
parent ace867f60b
commit 64b524a193
1 changed files with 6 additions and 0 deletions

View File

@ -17,8 +17,11 @@
package org.apache.solr.core;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.util.AbstractSolrTestCase;
import org.apache.solr.util.TestHarness;
import org.junit.BeforeClass;
import java.io.File;
public class TestBadConfig extends AbstractSolrTestCase {
@ -33,6 +36,8 @@ public class TestBadConfig extends AbstractSolrTestCase {
+ getClass().getName());
dataDir.mkdirs();
try {
SolrTestCaseJ4.ignoreException("unset.sys.property");
solrConfig = new SolrConfig(getSolrConfigFile());
h = new TestHarness( dataDir.getAbsolutePath(),
solrConfig,
@ -40,6 +45,7 @@ public class TestBadConfig extends AbstractSolrTestCase {
fail("Exception should have been thrown");
} catch (Exception e) {
assertTrue(e.getMessage().contains("unset.sys.property"));
SolrTestCaseJ4.resetExceptionIgnores();
}
}