lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [16/18] lucenenet git commit: Lets catch more failing tests
Date Tue, 06 Jan 2015 03:46:32 GMT
Lets catch more failing tests


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

Branch: refs/heads/master
Commit: 309ebc724b7e5f511ae8b03033651df04db3c3b8
Parents: 3b37fac
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Mon Jan 5 19:10:53 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Mon Jan 5 19:10:53 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/NIOFSDirectory.cs                 | 7 ++++---
 src/Lucene.Net.Tests/core/Store/TestDirectory.cs            | 2 +-
 src/Lucene.Net.Tests/core/Store/TestLockFactory.cs          | 2 +-
 src/Lucene.Net.Tests/core/Store/TestMockDirectoryWrapper.cs | 4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/309ebc72/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NIOFSDirectory.cs b/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
index d31c59e..682c8a8 100644
--- a/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/NIOFSDirectory.cs
@@ -1,3 +1,4 @@
+using System.Threading;
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics;
@@ -98,9 +99,9 @@ namespace Lucene.Net.Store
         {
             private readonly NIOFSDirectory OuterInstance;
 
-            private Lucene.Net.Store.IOContext Context;
-            private FileInfo Path;
-            private FileStream Descriptor;
+            private readonly IOContext Context;
+            private readonly FileInfo Path;
+            private readonly FileStream Descriptor;
 
             public IndexInputSlicerAnonymousInnerClassHelper(NIOFSDirectory outerInstance,
Lucene.Net.Store.IOContext context, FileInfo path, FileStream descriptor)
                 : base(outerInstance)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/309ebc72/src/Lucene.Net.Tests/core/Store/TestDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestDirectory.cs b/src/Lucene.Net.Tests/core/Store/TestDirectory.cs
index 9ea4097..8d4df01 100644
--- a/src/Lucene.Net.Tests/core/Store/TestDirectory.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestDirectory.cs
@@ -161,7 +161,7 @@ namespace Lucene.Net.Store
 
         // Test that different instances of FSDirectory can coexist on the same
         // path, can read, write, and lock files.
-        [Test]
+        [Test, Timeout(int.MaxValue)]
         public virtual void TestDirectInstantiation()
         {
             DirectoryInfo path = CreateTempDir("testDirectInstantiation");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/309ebc72/src/Lucene.Net.Tests/core/Store/TestLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestLockFactory.cs b/src/Lucene.Net.Tests/core/Store/TestLockFactory.cs
index a3230ff..674c8b6 100644
--- a/src/Lucene.Net.Tests/core/Store/TestLockFactory.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestLockFactory.cs
@@ -194,7 +194,7 @@ namespace Lucene.Net.Store
         }
 
         // Verify: NativeFSLockFactory works correctly
-        [Test]
+        [Test, Timeout(int.MaxValue)]
         public virtual void TestNativeFSLockFactory()
         {
             var f = new NativeFSLockFactory(CreateTempDir("testNativeFsLockFactory"));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/309ebc72/src/Lucene.Net.Tests/core/Store/TestMockDirectoryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestMockDirectoryWrapper.cs b/src/Lucene.Net.Tests/core/Store/TestMockDirectoryWrapper.cs
index 932740b..6cfd723 100644
--- a/src/Lucene.Net.Tests/core/Store/TestMockDirectoryWrapper.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestMockDirectoryWrapper.cs
@@ -65,11 +65,11 @@ namespace Lucene.Net.Store
             dir.Dispose();
         }
 
-        [Test]
+        [Test, Repeat(100)]
         public virtual void TestDiskFull()
         {
             // test writeBytes
-            MockDirectoryWrapper dir = NewMockDirectory();
+            var dir = NewMockDirectory();
             dir.MaxSizeInBytes = 3;
             var bytes = new byte[] { 1, 2 };
             IndexOutput @out = dir.CreateOutput("foo", IOContext.DEFAULT);


Mime
View raw message