lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject lucenenet git commit: uncomment out incorrect default codec setting, fixes for read return values
Date Wed, 31 Dec 2014 16:55:33 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 971b6a320 -> 3c3b8f620


uncomment out incorrect default codec setting, fixes for read return values


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

Branch: refs/heads/master
Commit: 3c3b8f620d9e29c327b0dba2e8f3589012c83e1f
Parents: 971b6a3
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Wed Dec 31 11:10:43 2014 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Wed Dec 31 11:10:43 2014 -0500

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Analysis/TestGraphTokenizers.cs |  4 +++-
 src/Lucene.Net.Tests/core/Index/TestRollingUpdates.cs     | 10 ++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3c3b8f62/src/Lucene.Net.Tests/core/Analysis/TestGraphTokenizers.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Analysis/TestGraphTokenizers.cs b/src/Lucene.Net.Tests/core/Analysis/TestGraphTokenizers.cs
index bf85d9a..dffb392 100644
--- a/src/Lucene.Net.Tests/core/Analysis/TestGraphTokenizers.cs
+++ b/src/Lucene.Net.Tests/core/Analysis/TestGraphTokenizers.cs
@@ -123,7 +123,9 @@ namespace Lucene.Net.Analysis
                     int count = input.Read(buffer, 0, buffer.Length);
 
                     //.NET TextReader.Read(buff, int, int) returns 0, not -1 on no chars
-                    if (count == 0)
+                    // but in some cases, such as MockCharFilter, it overloads read and returns
-1
+                    // so we should handle both 0 and -1 values
+                    if (count <= 0)
                     {
                         break;
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3c3b8f62/src/Lucene.Net.Tests/core/Index/TestRollingUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestRollingUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestRollingUpdates.cs
index 9f980f2..8032dfc 100644
--- a/src/Lucene.Net.Tests/core/Index/TestRollingUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestRollingUpdates.cs
@@ -48,10 +48,12 @@ namespace Lucene.Net.Index
             LineFileDocs docs = new LineFileDocs(random, DefaultCodecSupportsDocValues());
 
             //provider.register(new MemoryCodec());
-            if ((!"Lucene3x".Equals(Codec.Default.Name)) && Random().NextBoolean())
-            {
-                Codec.Default = TestUtil.AlwaysPostingsFormat(new Codecs.Lucene3x.Lucene3xPostingsFormat(/*Random().NextBoolean(),
random.NextDouble()*/));
-            }
+            // LUCENE TODO: uncomment this out once MemoryPostingsFormat is brought over
+            //if ((!"Lucene3x".Equals(Codec.Default.Name)) && Random().NextBoolean())
+            //{
+            //    Codec.Default =
+            //        TestUtil.AlwaysPostingsFormat(new MemoryPostingsFormat(random().nextBoolean(),
random.NextFloat()));
+            //}
 
             MockAnalyzer analyzer = new MockAnalyzer(Random());
             analyzer.MaxTokenLength = TestUtil.NextInt(Random(), 1, IndexWriter.MAX_TERM_LENGTH);


Mime
View raw message