lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lai...@apache.org
Subject lucenenet git commit: reduce randomness
Date Sat, 23 May 2015 13:27:05 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/failingtests abcfdf231 -> 38a4dffb2


reduce randomness


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

Branch: refs/heads/failingtests
Commit: 38a4dffb23b1705ca3038c99ebbc19fe245f91d9
Parents: abcfdf2
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sat May 23 09:26:09 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sat May 23 09:26:09 2015 -0400

----------------------------------------------------------------------
 .../core/Search/TestTopDocsMerge.cs             | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/38a4dffb/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs b/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
index 6e8ee6e..eb8f547 100644
--- a/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestTopDocsMerge.cs
@@ -196,23 +196,23 @@ namespace Lucene.Net.Search
                 Query query = new TermQuery(new Term("text", tokens[Random().Next(tokens.Length)]));
 
                 Sort sort;
-                if (Random().Next(10) == 4)
+                //if (Random().Next(10) == 4)
                 {
                     // Sort by score
                     sort = null;
                 }
-                else
-                {
-                    SortField[] randomSortFields = new SortField[TestUtil.NextInt(Random(),
1, 3)];
-                    for (int sortIDX = 0; sortIDX < randomSortFields.Length; sortIDX++)
-                    {
-                        randomSortFields[sortIDX] = sortFields[Random().Next(sortFields.Count)];
-                    }
-                    sort = new Sort(randomSortFields);
-                }
-
-                int numHits = TestUtil.NextInt(Random(), 1, numDocs + 5);
-                //final int numHits = 5;
+                //else
+                //{
+                //    SortField[] randomSortFields = new SortField[TestUtil.NextInt(Random(),
1, 3)];
+                //    for (int sortIDX = 0; sortIDX < randomSortFields.Length; sortIDX++)
+                //    {
+                //        randomSortFields[sortIDX] = sortFields[Random().Next(sortFields.Count)];
+                //    }
+                //    sort = new Sort(randomSortFields);
+                //}
+
+                //int numHits = TestUtil.NextInt(Random(), 1, numDocs + 5);
+                int numHits = 5;
 
                 //if (VERBOSE)
                 {


Mime
View raw message