From 199610cd7810ec3a4e818bf4ae837cf071e4d128 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Mon, 15 Dec 2014 16:49:09 +0000 Subject: [PATCH] SOLR-6849: Fix @Slow test git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1645695 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/cloud/RemoteQueryErrorTest.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java b/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java index f907cee90cd..c09882a8822 100644 --- a/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/RemoteQueryErrorTest.java @@ -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 extends AbstractFullDistribZkTestBase { 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 {