lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: BUG (test fixture): Lucene.Net.Support (TestIDisposable + TestOldPatches + TestSerialization + Threading.TestClosableThreadLocal): Use LuceneTestCase so we can suppress the non-writable Lucene3x codec, which causes random failures i
Date Fri, 19 May 2017 04:32:39 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 1a980c496 -> cfeaf2841


BUG (test fixture): Lucene.Net.Support (TestIDisposable + TestOldPatches + TestSerialization
+ Threading.TestClosableThreadLocal): Use LuceneTestCase so we can suppress the non-writable
Lucene3x codec, which causes random failures in these 6 tests.


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

Branch: refs/heads/master
Commit: cfeaf284184a1bee972f2f941b4cf5b13f236625
Parents: 1a980c4
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri May 19 11:30:49 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri May 19 11:31:44 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Support/TestIDisposable.cs        | 13 +++++++++----
 src/Lucene.Net.Tests/Support/TestOldPatches.cs         |  5 ++++-
 src/Lucene.Net.Tests/Support/TestSerialization.cs      |  3 ++-
 .../Support/Threading/TestCloseableThreadLocal.cs      |  5 ++++-
 4 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cfeaf284/src/Lucene.Net.Tests/Support/TestIDisposable.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/TestIDisposable.cs b/src/Lucene.Net.Tests/Support/TestIDisposable.cs
index af3895c..2f9cdb2 100644
--- a/src/Lucene.Net.Tests/Support/TestIDisposable.cs
+++ b/src/Lucene.Net.Tests/Support/TestIDisposable.cs
@@ -21,29 +21,34 @@
 
 using Lucene.Net.Analysis.Core;
 using Lucene.Net.Attributes;
+using Lucene.Net.Codecs;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.Store;
+using Lucene.Net.Util;
 using NUnit.Framework;
 using System;
 
 #pragma warning disable 612, 618
 namespace Lucene.Net.Support
 {
+    [SuppressCodecs("Lucene3x")] // Suppress non-writable codecs
     [TestFixture]
-    public class TestIDisposable
+    public class TestIDisposable : LuceneTestCase
     {
         [Test, LuceneNetSpecific]
         public void TestReadersWriters()
         {
             BaseDirectory dir;
-            
-            using(dir = new RAMDirectory())
+
+            using (dir = new RAMDirectory())
             {
                 Document doc;
                 IndexWriter writer;
                 IndexReader reader;
-                IndexWriterConfig conf = new IndexWriterConfig(Util.LuceneVersion.LUCENE_CURRENT,
new WhitespaceAnalyzer(Util.LuceneVersion.LUCENE_CURRENT));
+                IndexWriterConfig conf = new IndexWriterConfig(
+                    Util.LuceneVersion.LUCENE_CURRENT, 
+                    new WhitespaceAnalyzer(Util.LuceneVersion.LUCENE_CURRENT));
 
                 using (writer = new IndexWriter(dir, conf /*new WhitespaceAnalyzer(), true,
IndexWriter.MaxFieldLength.UNLIMITED)*/))
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cfeaf284/src/Lucene.Net.Tests/Support/TestOldPatches.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/TestOldPatches.cs b/src/Lucene.Net.Tests/Support/TestOldPatches.cs
index f706e08..ccf7062 100644
--- a/src/Lucene.Net.Tests/Support/TestOldPatches.cs
+++ b/src/Lucene.Net.Tests/Support/TestOldPatches.cs
@@ -29,12 +29,15 @@ using Lucene.Net.Store;
 using Lucene.Net.Test;
 using NUnit.Framework;
 using Version = Lucene.Net.Util.LuceneVersion;
+using Lucene.Net.Codecs;
+using Lucene.Net.Util;
 
 #pragma warning disable 612, 618
 namespace Lucene.Net.Support
 {
+    [SuppressCodecs("Lucene3x")] // Suppress non-writable codecs
     [TestFixture]
-    public class TestOldPatches
+    public class TestOldPatches : LuceneTestCase
     {
         ////-------------------------------------------
         //[Test]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cfeaf284/src/Lucene.Net.Tests/Support/TestSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/TestSerialization.cs b/src/Lucene.Net.Tests/Support/TestSerialization.cs
index 323dd3a..1086947 100644
--- a/src/Lucene.Net.Tests/Support/TestSerialization.cs
+++ b/src/Lucene.Net.Tests/Support/TestSerialization.cs
@@ -32,8 +32,9 @@ using Lucene.Net.Attributes;
 #pragma warning disable 612, 618
 namespace Lucene.Net.Support
 {
+    [SuppressCodecs("Lucene3x")] // Suppress non-writable codecs
     [TestFixture]
-    public class TestSerialization
+    public class TestSerialization : LuceneTestCase
     {
         Lucene.Net.Store.RAMDirectory dir = null;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cfeaf284/src/Lucene.Net.Tests/Support/Threading/TestCloseableThreadLocal.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/Threading/TestCloseableThreadLocal.cs b/src/Lucene.Net.Tests/Support/Threading/TestCloseableThreadLocal.cs
index 8c509df..9f9e573 100644
--- a/src/Lucene.Net.Tests/Support/Threading/TestCloseableThreadLocal.cs
+++ b/src/Lucene.Net.Tests/Support/Threading/TestCloseableThreadLocal.cs
@@ -21,10 +21,12 @@
 
 using Lucene.Net.Analysis;
 using Lucene.Net.Attributes;
+using Lucene.Net.Codecs;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.Search;
 using Lucene.Net.Store;
+using Lucene.Net.Util;
 using NUnit.Framework;
 using System;
 using Version = Lucene.Net.Util.LuceneVersion;
@@ -32,8 +34,9 @@ using Version = Lucene.Net.Util.LuceneVersion;
 #pragma warning disable 612, 618
 namespace Lucene.Net.Support.Threading
 {
+    [SuppressCodecs("Lucene3x")] // Suppress non-writable codecs
     [TestFixture]
-    public class TestCloseableThreadLocal
+    public class TestCloseableThreadLocal : LuceneTestCase
     {
         [Test, LuceneNetSpecific]
         public void TestMemLeakage()


Mime
View raw message