Github user gerlowskija commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/425#discussion_r204599561
  
    --- 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 --
    
    [-1] I agree with your intention here (it's a good assertion to add), but 
I'd rather keep non-refactor changes out of this PR.  Just in the interest of 
changing the test-behavior as little as possible for this refactor JIRA.  Would 
you mind taking out this assertion?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to