lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [1/3] lucenenet git commit: HACK: Forcing all ThaiAnalyzer/ThaiTokenizer/SegmentingTokenizerBase tests to fail explicitly on .NET Core, since they could throw an AccessViolationException that crashes the dotnet.exe test runner.
Date Fri, 07 Apr 2017 07:18:38 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work 4be95930a -> 45ed8149d


HACK: Forcing all ThaiAnalyzer/ThaiTokenizer/SegmentingTokenizerBase tests to fail explicitly
on .NET Core, since they could throw an AccessViolationException that crashes the dotnet.exe
test runner.


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

Branch: refs/heads/api-work
Commit: f75f1418d41364de2afae9d731f027102eb8db85
Parents: c2a506f
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Apr 7 01:26:43 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Fri Apr 7 14:02:07 2017 +0700

----------------------------------------------------------------------
 .../Analysis/Core/TestRandomChains.cs                    | 11 +++++++++--
 .../Analysis/Th/TestThaiAnalyzer.cs                      |  4 ++++
 .../Analysis/Th/TestThaiTokenizerFactory.cs              |  9 +++++++++
 .../Analysis/Th/TestThaiWordFilterFactory.cs             |  9 +++++++++
 .../Analysis/Util/TestSegmentingTokenizerBase.cs         |  8 ++++++++
 5 files changed, 39 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f75f1418/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
index b8f0219..b7d38e8 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
@@ -96,6 +96,11 @@ namespace Lucene.Net.Analysis.Core
                     // offsets offenders?
                     // doesn't actual reset itself:
                     typeof(CachingTokenFilter),
+
+#if NETSTANDARD
+                    // LUCENENET TODO: icu-dotnet is throwing AccessViolationException, bringing
down the test runner
+                    typeof(Th.ThaiTokenizer),
+#endif
                     // Not broken: we forcefully add this, so we shouldn't
                     // also randomly pick it:
                     typeof(ValidatingTokenFilter)))
@@ -127,6 +132,8 @@ namespace Lucene.Net.Analysis.Core
                     typeof(CommonGramsQueryFilter),
                     // TODO: probably doesnt handle graph inputs, too afraid to try
                     typeof(WordDelimiterFilter)))
+
+
                 {
                     foreach (ConstructorInfo ctor in c.GetConstructors())
                     {
@@ -296,9 +303,9 @@ namespace Lucene.Net.Analysis.Core
             { typeof(Regex[]), new RegexArrayArgProducer() },
             { typeof(IPayloadEncoder), new PayloadEncoderArgProducer() },
             { typeof(Dictionary), new DictionaryArgProducer() },
-            #pragma warning disable 612, 618 
+#pragma warning disable 612, 618
             { typeof(Lucene43EdgeNGramTokenizer.Side), new Lucene43SideArgProducer() },
-            #pragma warning restore 612, 618 
+#pragma warning restore 612, 618
             { typeof(EdgeNGramTokenFilter.Side), new SideArgProducer() },
             { typeof(HyphenationTree), new HyphenationTreeArgProducer() },
             { typeof(SnowballProgram), new SnowballProgramArgProducer() },

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f75f1418/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
index 0cb17c7..038d0b4 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
@@ -37,6 +37,10 @@ namespace Lucene.Net.Analysis.Th
         {
             base.SetUp();
             AssumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiTokenizer.DBBI_AVAILABLE);
+
+#if NETSTANDARD
+            fail("LUCENENET TODO: AccessViolationException being thrown from icu-dotnet");
+#endif
         }
         /*
          * testcase for offsets

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f75f1418/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
index 6de1cf6..17a592d 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
@@ -26,6 +26,15 @@ namespace Lucene.Net.Analysis.Th
     /// </summary>
     public class TestThaiTokenizerFactory : BaseTokenStreamFactoryTestCase
     {
+
+        public override void SetUp()
+        {
+            base.SetUp();
+#if NETSTANDARD
+            fail("LUCENENET TODO: AccessViolationException being thrown from icu-dotnet");
+#endif
+        }
+
         /// <summary>
         /// Ensure the filter actually decomposes text.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f75f1418/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
index c077410..a3972f2 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
@@ -25,9 +25,18 @@ namespace Lucene.Net.Analysis.Th
     /// <summary>
     /// Simple tests to ensure the Thai word filter factory is working.
     /// </summary>
+
     [Obsolete]
     public class TestThaiWordFilterFactory : BaseTokenStreamFactoryTestCase
     {
+        public override void SetUp()
+        {
+            base.SetUp();
+#if NETSTANDARD
+            fail("LUCENENET TODO: AccessViolationException being thrown from icu-dotnet");
+#endif
+        }
+
         /// <summary>
         /// Ensure the filter actually decomposes text.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f75f1418/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
index 86fda8f..34ca075 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
@@ -34,6 +34,14 @@ namespace Lucene.Net.Analysis.Util
     [TestFixture]
     public class TestSegmentingTokenizerBase : BaseTokenStreamTestCase
     {
+        public override void SetUp()
+        {
+            base.SetUp();
+#if NETSTANDARD
+            fail("LUCENENET TODO: AccessViolationException being thrown from icu-dotnet");
+#endif
+        }
+
         private Analyzer sentence = new AnalyzerAnonymousInnerClassHelper();
 
         private class AnalyzerAnonymousInnerClassHelper : Analyzer


Mime
View raw message