From 7e6eb910a353c0659c3e3fec635a2b3bbc805f48 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 20 Nov 2020 22:40:36 +0700 Subject: [PATCH] Added the AwaitsFixAttribute to the known failing tests described in #363 and #269 --- .../Analysis/Th/TestThaiAnalyzer.cs | 4 +++- src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs | 4 +++- src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs | 1 + src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs | 5 ++++- src/Lucene.Net.Tests/Index/TestIndexWriter.cs | 2 ++ src/Lucene.Net.Tests/Search/TestBooleanQuery.cs | 3 +++ src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs | 3 +++ src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs | 3 ++- 8 files changed, 21 insertions(+), 4 deletions(-) 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 113bbc70e5..00bfc142d1 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs @@ -1,4 +1,4 @@ -#if FEATURE_BREAKITERATOR +#if FEATURE_BREAKITERATOR using J2N.Threading; using Lucene.Net.Analysis.Core; using Lucene.Net.Analysis.TokenAttributes; @@ -355,6 +355,7 @@ private static void AssertAnalyzer(Analyzer analyzer, string text) /// /// blast some random strings through the analyzer [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestRandomStrings() { CheckRandomData(Random, new ThaiAnalyzer(TEST_VERSION_CURRENT), 1000 * RandomMultiplier); @@ -364,6 +365,7 @@ public virtual void TestRandomStrings() /// blast some random large strings through the analyzer /// [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestRandomHugeStrings() { Random random = Random; diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs index 903d31548c..2ec8ec81bc 100644 --- a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs +++ b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs @@ -86,8 +86,10 @@ public override void TearDown() base.TearDown(); } - // LUCENENET TODO: Fails on x86, Release, net45 (but doesn't fail if any of these 3 parameters are changed) [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public virtual void TestQueries() { int n = AtLeast(4); diff --git a/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs b/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs index b3061ad7ca..d6a5a74fd7 100644 --- a/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs +++ b/src/Lucene.Net.Tests.Replicator/Http/HttpReplicatorTest.cs @@ -92,6 +92,7 @@ private void ReopenReader() [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public void TestBasic() { IReplicator replicator = new HttpReplicator(host, port, ReplicationService.REPLICATION_CONTEXT + "/s1", server.CreateHandler()); diff --git a/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs b/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs index 44a3e612a3..a0b3d85996 100644 --- a/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs +++ b/src/Lucene.Net.Tests.Sandbox/Queries/TestSlowFuzzyQuery.cs @@ -1,4 +1,4 @@ -using Lucene.Net.Documents; +using Lucene.Net.Documents; using Lucene.Net.Index; using Lucene.Net.Search; using Lucene.Net.Store; @@ -338,6 +338,9 @@ public void TestFuzzinessLong() * is not implemented correctly, there will be problems! */ [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public void TestTieBreaker() { Directory directory = NewDirectory(); diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs index 25ff8369b9..7e9ed60fdf 100644 --- a/src/Lucene.Net.Tests/Index/TestIndexWriter.cs +++ b/src/Lucene.Net.Tests/Index/TestIndexWriter.cs @@ -1439,6 +1439,7 @@ public override void Run() [Test] [Slow] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestThreadInterruptDeadlock() { IndexerThreadInterrupt t = new IndexerThreadInterrupt(this); @@ -1479,6 +1480,7 @@ public virtual void TestThreadInterruptDeadlock() /// testThreadInterruptDeadlock but with 2 indexer threads [Test] [Slow] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public virtual void TestTwoThreadsInterruptDeadlock() { IndexerThreadInterrupt t1 = new IndexerThreadInterrupt(this); diff --git a/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs b/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs index 13440327c3..c1868f0ae7 100644 --- a/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs +++ b/src/Lucene.Net.Tests/Search/TestBooleanQuery.cs @@ -214,6 +214,9 @@ public virtual void TestDeMorgan() } [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public virtual void TestBS2DisjunctionNextVsAdvance() { Directory d = NewDirectory(); diff --git a/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs b/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs index 8b0ddda816..c9601f1534 100644 --- a/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs +++ b/src/Lucene.Net.Tests/Search/TestFuzzyQuery.cs @@ -248,6 +248,9 @@ public virtual void Test2() /// is not implemented correctly, there will be problems! /// [Test] +#if NETFRAMEWORK + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test fails on x86 on .NET Framework in Release mode only +#endif public virtual void TestTieBreaker() { Directory directory = NewDirectory(); diff --git a/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs b/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs index de579b5cb1..27d58d2cb7 100644 --- a/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs +++ b/src/Lucene.Net.Tests/Support/Index/TestTaskMergeScheduler.cs @@ -1,4 +1,4 @@ -using Lucene.Net.Attributes; +using Lucene.Net.Attributes; using Lucene.Net.Documents; using Lucene.Net.Index.Extensions; using Lucene.Net.Store; @@ -79,6 +79,7 @@ public override void Eval(MockDirectoryWrapper dir) } [Test] + [AwaitsFix(BugUrl = "https://github.com/apache/lucenenet/issues/269")] // LUCENENET TODO: this test occasionally fails public void TestSubclassTaskMergeScheduler() { MockDirectoryWrapper dir = NewMockDirectory();