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/01/31 10:56:04 UTC

[lucene-solr] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


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

commit 4fc218e74e5af5a897a6ef4dbf0ea643c3f11fcc
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
           }
         }