You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/02/05 12:15:47 UTC

[lucene-solr] branch branch_8x updated: SOLR-13193: LeaderTragicEventTest doesn't catch NoSuchFileException when corrupting files

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

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


The following commit(s) were added to refs/heads/branch_8x by this push:
     new a552be9  SOLR-13193: LeaderTragicEventTest doesn't catch NoSuchFileException when corrupting files
a552be9 is described below

commit a552be9a1e5a8a002b022672c2f4465302a9aa15
Author: Dawid Weiss <dw...@apache.org>
AuthorDate: Thu Jan 31 11:55:05 2019 +0100

    SOLR-13193: LeaderTragicEventTest doesn't catch NoSuchFileException when corrupting files
---
 solr/core/src/test/org/apache/solr/cloud/LeaderTragicEventTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 a87ef2e..9bb44f4 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
           }
         }