You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mk...@apache.org on 2019/04/25 10:57:30 UTC
[lucene-solr] branch branch_8x updated: SOLR-13081: catching solrj
exception as well in the negative test
This is an automated email from the ASF dual-hosted git repository.
mkhl pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new efa9d95 SOLR-13081: catching solrj exception as well in the negative test
efa9d95 is described below
commit efa9d9571f56a0e013e62b993949a5fb66c2cc6f
Author: Mikhail Khludnev <mk...@apache.org>
AuthorDate: Thu Apr 25 13:49:42 2019 +0300
SOLR-13081: catching solrj exception as well in the negative test
---
.../apache/solr/update/TestInPlaceUpdateWithRouteField.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdateWithRouteField.java b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdateWithRouteField.java
index 439c0c5..14a4808 100644
--- a/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdateWithRouteField.java
+++ b/solr/core/src/test/org/apache/solr/update/TestInPlaceUpdateWithRouteField.java
@@ -33,7 +33,6 @@ import java.util.stream.Collectors;
import org.apache.lucene.util.TestUtil;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.BaseHttpSolrClient.RemoteSolrException;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.CollectionAdminRequest.Create;
import org.apache.solr.client.solrj.request.UpdateRequest;
@@ -41,6 +40,7 @@ import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.SolrCloudTestCase;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrDocumentList;
+import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrInputDocument;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -115,11 +115,11 @@ public class TestInPlaceUpdateWithRouteField extends SolrCloudTestCase {
Assert.assertThat("Lucene doc id should not be changed for In-Place Updates.", solrDocument.get("[docid]"), is(luceneDocId));
try {
- sdoc.remove("shardName");
- new UpdateRequest()
- .add(sdoc).process(cluster.getSolrClient(), COLLECTION);
- fail("should be exception w/o route field");
- }catch(RemoteSolrException ex) {
+ sdoc.remove("shardName");
+ new UpdateRequest()
+ .add(sdoc).process(cluster.getSolrClient(), COLLECTION);
+ fail("expect an exception w/o route field");
+ }catch(SolrException ex) {
assertThat("expecting 400 in "+ex.getMessage(), ex.code(), is(400));
}
}