lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r1213858 - in /lucene/dev/branches/branch_3x: ./ lucene/ solr/ solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
Date Tue, 13 Dec 2011 18:54:45 GMT
Author: gsingers
Date: Tue Dec 13 18:54:45 2011
New Revision: 1213858

URL: http://svn.apache.org/viewvc?rev=1213858&view=rev
Log:
SOLR-1730: backport to 3x

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java

Modified: lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java?rev=1213858&r1=1213857&r2=1213858&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
(original)
+++ lucene/dev/branches/branch_3x/solr/core/src/test/org/apache/solr/handler/component/BadComponentTest.java
Tue Dec 13 18:54:45 2011
@@ -33,9 +33,14 @@ public class BadComponentTest extends So
       System.setProperty("elevate.file", "foo.xml");
       initCore("solrconfig-elevate.xml", "schema12.xml");
       assertTrue(false);
-    } catch (Throwable e) {
-      log.error("Exception", e);
-      assertTrue(true);
+    } catch (RuntimeException e) {
+      //TODO: better way of checking this?
+      if (e.getCause() instanceof SolrException && e.getCause().getCause().getMessage().equals("Error
initializing QueryElevationComponent.")){
+        log.error("Exception", e);
+        assertTrue(true);
+      } else {
+        assertTrue(false);
+      }
     } finally {
       System.clearProperty("elevate.file");
     }



Mime
View raw message