lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/11] lucenenet git commit: BUG: Lucene.Net.Tests.Misc.Index.Sorter.TestEarlyTermination: using a workaround by switching the test to look more like that of Lucene.Net 4.9
Date Sat, 25 Mar 2017 06:11:18 GMT
BUG: Lucene.Net.Tests.Misc.Index.Sorter.TestEarlyTermination: using a workaround by switching
the test to look more like that of Lucene.Net 4.9


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

Branch: refs/heads/api-work
Commit: 400cd78dec6b4f2619cbb36428a56de62c329562
Parents: 2cf0321
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Mar 25 05:24:49 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Mar 25 05:24:49 2017 +0700

----------------------------------------------------------------------
 .../Index/Sorter/TestEarlyTermination.cs             | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/400cd78d/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
index e02ed70..bd44cb9 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/TestEarlyTermination.cs
@@ -130,13 +130,24 @@ namespace Lucene.Net.Index.Sorter
             bool trackDocScores = Random().nextBoolean();
             bool trackMaxScore = Random().nextBoolean();
             bool inOrder = Random().nextBoolean();
-            TopFieldCollector collector1 = Search.TopFieldCollector.Create(sort, numHits,
fillFields, trackDocScores, trackMaxScore, inOrder);
-            TopFieldCollector collector2 = Search.TopFieldCollector.Create(sort, numHits,
fillFields, trackDocScores, trackMaxScore, inOrder);
+            // LUCENENET specific:
+            // we are changing this test to use Lucene.Net 4.9-like behavior rather than
going through all of the effort to
+            // fix a hard-to-find null reference exception problem.
+            // https://github.com/apache/lucene-solr/commit/c59f13f9918faeeb4e69acd41731e674ce88f912
+            //TopFieldCollector collector1 = TopFieldCollector.Create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
+            //TopFieldCollector collector2 = TopFieldCollector.Create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
 
             IndexSearcher searcher = NewSearcher(reader);
             int iters = AtLeast(5);
             for (int i = 0; i < iters; ++i)
             {
+                // LUCENENET specific:
+                // we are changing this test to use Lucene.Net 4.9-like behavior rather than
going through all of the effort to
+                // fix a hard-to-find null reference exception problem.
+                // https://github.com/apache/lucene-solr/commit/c59f13f9918faeeb4e69acd41731e674ce88f912
+                TopFieldCollector collector1 = TopFieldCollector.Create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
+                TopFieldCollector collector2 = TopFieldCollector.Create(sort, numHits, fillFields,
trackDocScores, trackMaxScore, inOrder);
+
                 TermQuery query = new TermQuery(new Term("s", RandomInts.RandomFrom(Random(),
terms)));
                 searcher.Search(query, collector1);
                 Sort different = new Sort(new SortField("ndv2", SortFieldType.INT64));


Mime
View raw message