Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

tests: ignore expected exceptions

Yonik Seeley2445887673ad
diff --git a/solr/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java b/solr/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java
index f409958d1f6..ec38e5c4ad3 100644
--- a/solr/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java
+++ b/solr/src/test/org/apache/solr/client/solrj/MultiCoreExampleTestBase.java
@@ -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();
diff --git a/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java b/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
index 665ea8be057..4ed36224a7c 100644
--- a/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
+++ b/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
@@ -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() );