From 9b9e87037942c2902add21c42cbbf5e586cd0203 Mon Sep 17 00:00:00 2001 From: Paul McArthur Date: Tue, 19 Mar 2024 15:13:06 -0700 Subject: [PATCH] Fix unreliable test --- solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java index 91ab353be1b..f363bb58068 100644 --- a/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/DeleteShardTest.java @@ -63,7 +63,7 @@ public void test() throws Exception { CollectionAdminRequest.deleteShard(collection, "shard1") .process(cluster.getSolrClient())); - ShardTestUtil.setSliceState(cluster, collection, "shard1", Slice.State.INACTIVE); + setSliceState(collection, "shard1", Slice.State.INACTIVE); // Can delete an INACTIVE shard CollectionAdminRequest.deleteShard(collection, "shard1").process(cluster.getSolrClient()); @@ -71,7 +71,7 @@ public void test() throws Exception { "Expected 'shard1' to be removed", collection, (n, c) -> c.getSlice("shard1") == null); // Can delete a shard under construction - ShardTestUtil.setSliceState(cluster, collection, "shard2", Slice.State.CONSTRUCTION); + setSliceState(collection, "shard2", Slice.State.CONSTRUCTION); CollectionAdminRequest.deleteShard(collection, "shard2").process(cluster.getSolrClient()); waitForState( "Expected 'shard2' to be removed", collection, (n, c) -> c.getSlice("shard2") == null);