You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/27 18:38:06 UTC

[lucene-solr] branch reference_impl updated: @397 This fails even though the exception is thrown, try the old fashioned way.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl by this push:
     new 97cc0e5  @397 This fails even though the exception is thrown, try the old fashioned way.
97cc0e5 is described below

commit 97cc0e5cc4a802ced61b23324e1a760df9817dbc
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Jul 27 13:37:51 2020 -0500

    @397 This fails even though the exception is thrown, try the old fashioned way.
---
 .../cloud/api/collections/CollectionsAPIDistClusterPerZkTest.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistClusterPerZkTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistClusterPerZkTest.java
index 03ae6f7..9231278 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistClusterPerZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/CollectionsAPIDistClusterPerZkTest.java
@@ -149,9 +149,13 @@ public class CollectionsAPIDistClusterPerZkTest extends SolrCloudTestCase {
   public void testTooManyReplicas() {
     CollectionAdminRequest req = CollectionAdminRequest.createCollection("collection", "conf", 2, 10);
 
-    expectThrows(Exception.class, () -> {
+    try {
       cluster.getSolrClient().request(req);
-    });
+      fail("Expected excetpion");
+    } catch (Exception e) {
+      // expected
+    }
+
   }
 
   @Test