You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2016/10/11 18:35:16 UTC

[31/47] lucenenet git commit: Fixed bug in Index.Test2BDocs that was causing the temp directory to be deleted before both tests were finished using it (which only failed when both tests were run at the same time).

Fixed bug in Index.Test2BDocs that was causing the temp directory to be deleted before both tests were finished using it (which only failed when both tests were run at the same time).


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

Branch: refs/heads/master
Commit: e77e6a11ccd2276c4a18f9d7bfb14922faceb848
Parents: 6d50af1
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Mon Oct 10 18:24:37 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Oct 11 00:26:26 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Index/Test2BDocs.cs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e77e6a11/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs b/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
index 8f9ed67..7bf3749 100644
--- a/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
+++ b/src/Lucene.Net.Tests/core/Index/Test2BDocs.cs
@@ -44,10 +44,18 @@ namespace Lucene.Net.Index
         }
 
         [TestFixtureTearDown]
-        public static void AfterClass()
+        public void AfterClass()
         {
             Dir.Dispose();
             Dir = null;
+            base.TearDown();
+        }
+
+        public override void TearDown()
+        {
+            // LUCENENET: We don't want our temp directory deleted until after
+            // all of the tests in the class run. So we need to override this and
+            // call base.TearDown() manually during TestFixtureTearDown
         }
 
         [Test]