Github user barrotsteindev commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/425#discussion_r204862363
--- Diff: solr/core/src/test/org/apache/solr/cloud/OverseerStatusTest.java
---
@@ -58,14 +59,13 @@ public void test() throws Exception {
SimpleOrderedMap<Object> reload = (SimpleOrderedMap<Object>)
collection_operations.get(CollectionParams.CollectionAction.RELOAD.toLower());
assertEquals("No stats for reload in OverseerCollectionProcessor", 1,
reload.get("requests"));
- try {
- CollectionAdminRequest.splitShard("non_existent_collection")
- .setShardName("non_existent_shard")
- .process(cluster.getSolrClient());
- fail("Split shard for non existent collection should have failed");
- } catch (Exception e) {
- // expected because we did not correctly specify required params for
split
- }
+ HttpSolrClient.RemoteSolrException e =
expectThrows(HttpSolrClient.RemoteSolrException.class, () ->
CollectionAdminRequest
+ .splitShard("non_existent_collection")
+ .setShardName("non_existent_shard")
+ .process(cluster.getSolrClient())
+ );
+ assertTrue("expected failure to be caused by non existent collection",
e.getMessage().contains("Could not find collection"));
--- End diff --
Sure thing
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]