tests: ignore expected exceptions

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@926749 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-23 19:44:28 +00:00
parent 43d6b2e7e2
commit 2445887673
2 changed files with 9 additions and 1 deletions

View File

@ -86,10 +86,12 @@ public abstract class MultiCoreExampleTestBase extends SolrExampleTestBase
// You can't add it to core1
try {
ignoreException("unknown field");
up.process( getSolrCore1() );
fail( "Can't add core0 field to core1!" );
}
catch( Exception ex ) {}
resetExceptionIgnores();
// Add to core1
doc.setField( "id", "BBB" );
@ -100,10 +102,12 @@ public abstract class MultiCoreExampleTestBase extends SolrExampleTestBase
// You can't add it to core1
try {
ignoreException("unknown field");
up.process( getSolrCore0() );
fail( "Can't add core1 field to core0!" );
}
catch( Exception ex ) {}
resetExceptionIgnores();
// now Make sure AAA is in 0 and BBB in 1
SolrQuery q = new SolrQuery();

View File

@ -33,6 +33,10 @@ public class BadIndexSchemaTest extends AbstractSolrTestCase {
@Override
public void setUp() throws Exception {
ignoreException("_twice");
ignoreException("ftAgain");
ignoreException("fAgain");
super.setUp();
}
@ -59,7 +63,7 @@ public class BadIndexSchemaTest extends AbstractSolrTestCase {
IndexSchema schema = core.getSchema();
for( Throwable t : SolrConfig.severeErrors ) {
log.error( "ERROR:"+t.getMessage() );
log.info( "got ex:"+t.getMessage() );
}
assertEquals( 3, SolrConfig.severeErrors.size() );