Lucene.Net.Tests.Index.TestAddIndexes: added DirectoryNotFoundException to the 
exceptions to be checked for


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/76efed0d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/76efed0d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/76efed0d

Branch: refs/heads/api-work
Commit: 76efed0d3b036e3e810d35b8d320facb68a99a1b
Parents: 362133a
Author: Shad Storhaug <[email protected]>
Authored: Thu Mar 30 20:00:49 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Thu Mar 30 20:00:49 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Index/TestAddIndexes.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/76efed0d/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestAddIndexes.cs 
b/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
index 8436220..27b87d4 100644
--- a/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
+++ b/src/Lucene.Net.Tests/Index/TestAddIndexes.cs
@@ -955,7 +955,9 @@ namespace Lucene.Net.Index
                 {
                     report = !DidClose;
                 }
-                else if (t is FileNotFoundException/* || t is 
NoSuchFileException*/)
+                // LUCENENET specific - since NoSuchDirectoryException 
subclasses FileNotFoundException
+                // in Lucene, we need to handle it here to be on the safe side.
+                else if (t is FileNotFoundException/* || t is 
NoSuchFileException*/ || t is DirectoryNotFoundException)
                 {
                     report = !DidClose;
                 }

Reply via email to