lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [26/50] [abbrv] lucenenet git commit: BUG: Lucene.Net.Tests.Search.TestMutiTermConstantScore: Made Small and Reader variables instance members, since they are being set by instance methods. When they were static, tests could cross threads on the instance
Date Sat, 09 Sep 2017 00:31:44 GMT
BUG: Lucene.Net.Tests.Search.TestMutiTermConstantScore: Made Small and Reader variables instance
members, since they are being set by instance methods. When they were static, tests could
cross threads on the instance.


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

Branch: refs/heads/master
Commit: 7e8841ad54659de4fcf2cb0f287ef313e6a5136f
Parents: 75ee027
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Sep 8 01:03:50 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Sep 8 01:03:50 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7e8841ad/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs b/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
index 8d06a08..54cab59 100644
--- a/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
+++ b/src/Lucene.Net.Tests/Search/TestMultiTermConstantScore.cs
@@ -43,8 +43,11 @@ namespace Lucene.Net.Search
         /// threshold for comparing floats </summary>
         public const float SCORE_COMP_THRESH = 1e-6f;
 
-        internal static Directory Small;
-        internal static IndexReader Reader;
+        // LUCENENET specific - made these instance variables
+        // since our BeforeClass() and AfterClass() are instance
+        // methods and not doing so makes them cross runner threads.
+        internal /*static*/ Directory Small;
+        internal /*static*/ IndexReader Reader;
 
         public static void AssertEquals(string m, int e, int a)
         {


Mime
View raw message