mirror of https://github.com/apache/lucene.git
SOLR-13193: LeaderTragicEventTest doesn't catch NoSuchFileException when corrupting files
This commit is contained in:
parent
66fb333bdd
commit
a552be9a1e
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue