lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [6/7] lucenenet git commit: Lucene.Net.Tests.Search.TestControlledRealTimeReopenThread: Fixed tests for .NET Core and added file to the test project
Date Fri, 24 Mar 2017 11:47:54 GMT
Lucene.Net.Tests.Search.TestControlledRealTimeReopenThread: Fixed tests for .NET Core and added
file to the test project


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

Branch: refs/heads/api-work
Commit: f51675f444b68288c57c42311091e0450cb71059
Parents: 3d14c8e
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Mar 24 18:44:38 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Mar 24 18:44:38 2017 +0700

----------------------------------------------------------------------
 .../Search/TestControlledRealTimeReopenThread.cs        | 12 ++++++++++++
 src/Lucene.Net.Tests/project.json                       |  1 -
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f51675f4/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs b/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
index 89222c3..ef3f1b4 100644
--- a/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net.Tests/Search/TestControlledRealTimeReopenThread.cs
@@ -274,13 +274,17 @@ namespace Lucene.Net.Search
 
             nrtDeletesThread = new ControlledRealTimeReopenThread<IndexSearcher>(genWriter,
nrtDeletes, maxReopenSec, minReopenSec);
             nrtDeletesThread.Name = "NRTDeletes Reopen Thread";
+#if !NETSTANDARD
             nrtDeletesThread.Priority = (ThreadPriority)Math.Min((int)Thread.CurrentThread.Priority
+ 2, (int)ThreadPriority.Highest);
+#endif
             nrtDeletesThread.SetDaemon(true);
             nrtDeletesThread.Start();
 
             nrtNoDeletesThread = new ControlledRealTimeReopenThread<IndexSearcher>(genWriter,
nrtNoDeletes, maxReopenSec, minReopenSec);
             nrtNoDeletesThread.Name = "NRTNoDeletes Reopen Thread";
+#if !NETSTANDARD
             nrtNoDeletesThread.Priority = (ThreadPriority)Math.Min((int)Thread.CurrentThread.Priority
+ 2, (int)ThreadPriority.Highest);
+#endif
             nrtNoDeletesThread.SetDaemon(true);
             nrtNoDeletesThread.Start();
         }
@@ -490,15 +494,19 @@ namespace Lucene.Net.Search
 
             public override void Run()
             {
+#if !NETSTANDARD
                 try
                 {
+#endif
                     thread.WaitForGeneration(lastGen);
+#if !NETSTANDARD
                 }
                 catch (ThreadInterruptedException ie)
                 {
                     Thread.CurrentThread.Interrupt();
                     throw new Exception(ie.Message, ie);
                 }
+#endif
                 finished.Set(true);
             }
         }
@@ -521,13 +529,16 @@ namespace Lucene.Net.Search
             public override void UpdateDocument(Term term, IEnumerable<IIndexableField>
doc, Analyzer analyzer)
             {
                 base.UpdateDocument(term, doc, analyzer);
+#if !NETSTANDARD
                 try
                 {
+#endif
                     if (waitAfterUpdate)
                     {
                         signal.Reset(signal.CurrentCount == 0 ? 0 : signal.CurrentCount -
1);
                         latch.Wait();
                     }
+#if !NETSTANDARD
                 }
 #pragma warning disable 168
                 catch (ThreadInterruptedException e)
@@ -535,6 +546,7 @@ namespace Lucene.Net.Search
                 {
                     throw;
                 }
+#endif
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f51675f4/src/Lucene.Net.Tests/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/project.json b/src/Lucene.Net.Tests/project.json
index 82d1117..8222e58 100644
--- a/src/Lucene.Net.Tests/project.json
+++ b/src/Lucene.Net.Tests/project.json
@@ -19,7 +19,6 @@
         "TestMergeSchedulerExternal.cs",
         "TestWorstCaseTestBehavior.cs",
         "Index/TestConcurrentMergeScheduler.cs",
-        "Search/TestControlledRealTimeReopenThread.cs",
         "Support/BigObject.cs",
         "Support/CollisionTester.cs",
         "Support/SmallObject.cs",


Mime
View raw message