diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderTragicEventTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderTragicEventTest.java index a87ef2e4216..9bb44f49421 100644 --- a/solr/core/src/test/org/apache/solr/cloud/LeaderTragicEventTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/LeaderTragicEventTest.java @@ -23,6 +23,7 @@ import static org.hamcrest.CoreMatchers.is; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.invoke.MethodHandles; +import java.nio.file.NoSuchFileException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -132,7 +133,7 @@ public class LeaderTragicEventTest extends SolrCloudTestCase { try { mockDir.corruptFiles(Collections.singleton(file)); - } catch (RuntimeException | FileNotFoundException e) { + } catch (RuntimeException | FileNotFoundException | NoSuchFileException e) { // merges can lead to this exception } }