SOLR-6849: Fix @Slow test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1645695 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alan Woodward 2014-12-15 16:49:09 +00:00
parent 010bf8d77d
commit 199610cd78
1 changed files with 6 additions and 4 deletions

View File

@ -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 {