lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r926715 - /lucene/dev/trunk/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java
Date Tue, 23 Mar 2010 18:43:10 GMT
Author: yonik
Date: Tue Mar 23 18:43:10 2010
New Revision: 926715

URL: http://svn.apache.org/viewvc?rev=926715&view=rev
Log:
tests: ignore expected exceptions

Modified:
    lucene/dev/trunk/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java?rev=926715&r1=926714&r2=926715&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java Tue Mar
23 18:43:10 2010
@@ -75,8 +75,10 @@ public class RequiredFieldsTest extends 
 
     // Add another document without a required name, which has no default
     assertNull(core.getSchema().getField("name").getDefaultValue());
+    ignoreException("missing required field");
     assertFailedU("adding doc without required field",
           adoc("id", "531", "subject", "no name document", "field_t", "what's inside?") );
+    resetExceptionIgnores();
     assertU(commit());
     
     // Check to make sure this submission did not succeed
@@ -109,24 +111,27 @@ public class RequiredFieldsTest extends 
     // All three should have made it into the index
     assertQ("should find three", req("name:nosubject") ,"//result[@numFound=3]" );
     
+
     // Add three documents at once, with the middle with a bad field definition,
     // to establish the baselinie behavior for errors in a multi-ad submission
     assertFailedU("adding 3 documents, with 2nd one with undefined field",
           "<add>" +doc("id", "801", "name", "baddef batch one", "field_t", "what's
inside?", "subject", "info") +
-          doc("id", "802", "field_t", "name", "baddef batch two", "what's inside?", "subject",
"info", "GaRbAgeFiElD", "garbage") +
+          doc("id", "802", "name", "baddef batch two", "missing_field_ignore_exception",
"garbage") +
             doc("id", "803", "name", "baddef batch three", "field_t", "what's inside?", "subject",
"info") +
             "</add>");
-    assertU(commit());
+    assertU(commit());    
 
     // Check that only docs before the error should be in the index
     assertQ("should find one", req("name:baddef") ,"//result[@numFound=1]" );
 
+    ignoreException("missing required field");
     // Add three documents at once, with the middle one missing a required field that has
no default
     assertFailedU("adding 3 docs, with 2nd one missing required field",
       "<add>" +doc("id", "701", "name", "noname batch one", "field_t", "what's inside?",
"subject", "info") +
       doc("id", "702", "field_t", "what's inside?", "subject", "info") +
         doc("id", "703", "name", "noname batch batch three", "field_t", "what's inside?",
"subject", "info") +
         "</add>");
+    resetExceptionIgnores();
 
     assertU(commit());
 



Mime
View raw message