lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [3/4] git commit: Bypassing NRE in RandomizedContext
Date Tue, 05 Aug 2014 00:29:02 GMT
Bypassing NRE in RandomizedContext


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

Branch: refs/heads/branch_4x
Commit: 27d435b561aa6ba50038d265e0ca4f2802336725
Parents: bd24ffc
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Tue Aug 5 03:25:53 2014 +0300
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Tue Aug 5 03:25:53 2014 +0300

----------------------------------------------------------------------
 test/test-framework/LuceneTestCase.cs               | 3 ++-
 test/test-framework/Randomized/RandomizedContext.cs | 7 ++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/27d435b5/test/test-framework/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/test/test-framework/LuceneTestCase.cs b/test/test-framework/LuceneTestCase.cs
index 8586c9c..0460700 100644
--- a/test/test-framework/LuceneTestCase.cs
+++ b/test/test-framework/LuceneTestCase.cs
@@ -557,7 +557,8 @@ namespace Lucene.Net
 
         public static int AtLeast(int minimum)
         {
-            return AtLeast(RandomizedContext.Current.Random, minimum);
+            return AtLeast(new Random(), minimum);
+            //return AtLeast(RandomizedContext.Current.Random, minimum);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/27d435b5/test/test-framework/Randomized/RandomizedContext.cs
----------------------------------------------------------------------
diff --git a/test/test-framework/Randomized/RandomizedContext.cs b/test/test-framework/Randomized/RandomizedContext.cs
index 69567be..9a8cad2 100644
--- a/test/test-framework/Randomized/RandomizedContext.cs
+++ b/test/test-framework/Randomized/RandomizedContext.cs
@@ -46,7 +46,7 @@ namespace Lucene.Net.Randomized
         private readonly ThreadGroup threadGroup;
         private Type suiteClass;
         private volatile Boolean isDisposed = false;
-        private RandomizedRunner runner;
+        private readonly RandomizedRunner runner;
 
         public Type GetTargetType
         {
@@ -167,11 +167,8 @@ namespace Lucene.Net.Randomized
             }
         }
 
-
-
         public void Dispose()
-        {
-            throw new NotImplementedException();
+        {            
         }
     }
 }


Mime
View raw message