You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2014/12/15 17:52:17 UTC
svn commit: r1645696 - in /lucene/dev/branches/branch_5x: ./
solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java
Author: romseygeek
Date: Mon Dec 15 16:52:16 2014
New Revision: 1645696
URL: http://svn.apache.org/r1645696
Log:
SOLR-6849: Fix @Slow test
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java
Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java?rev=1645696&r1=1645695&r2=1645696&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java Mon Dec 15 16:52:16 2014
@@ -17,14 +17,16 @@ package org.apache.solr.cloud;
* limitations under the License.
*/
-import java.util.ArrayList;
-import java.util.List;
-
import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.internal.matchers.StringContains.containsString;
+
/**
* Verify that remote (proxied) queries return proper error messages
*/
@@ -60,7 +62,7 @@ public class RemoteQueryErrorTest extend
solrServer.add(emptyDoc);
fail("Expected unique key exceptoin");
} catch (SolrException ex) {
- assertEquals("Document is missing mandatory uniqueKey field: id", ex.getMessage());
+ assertThat(ex.getMessage(), containsString("Document is missing mandatory uniqueKey field: id"));
} catch(Exception ex) {
fail("Expected a SolrException to occur, instead received: " + ex.getClass());
} finally {