From 6a495db44427a5e0f6f457e77652dfe32a597d2f Mon Sep 17 00:00:00 2001 From: Ron Clabo Date: Thu, 18 Feb 2021 17:03:27 -0500 Subject: [PATCH 1/2] Reviewd All codecs. No real issues found. Added comments and removed unneeded commented out using statements. --- .../IntBlock/TestVariableIntBlockPostingsFormat.cs | 4 ---- src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs | 2 +- .../SimpleText/TestSimpleTextPostingsFormat.cs | 2 +- .../SimpleText/TestSimpleTextStoredFieldsFormat.cs | 4 ++++ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs index e9fd23acce..6079e8a497 100644 --- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs +++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestVariableIntBlockPostingsFormat.cs @@ -21,10 +21,6 @@ namespace Lucene.Net.Codecs.IntBlock * limitations under the License. */ - //using MockVariableIntBlockPostingsFormat = org.apache.lucene.codecs.mockintblock.MockVariableIntBlockPostingsFormat; - //using BasePostingsFormatTestCase = org.apache.lucene.index.BasePostingsFormatTestCase; - //using TestUtil = org.apache.lucene.util.TestUtil; - //using TestUtil = org.apache.lucene.util.TestUtil; /// /// Basic tests for VariableIntBlock diff --git a/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs b/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs index 19fd045048..50aad55ee0 100644 --- a/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs +++ b/src/Lucene.Net.Tests.Codecs/Pulsing/Test10KPulsings.cs @@ -68,7 +68,7 @@ public virtual void Test10kPulsed() Field field = NewField("field", "", ft); document.Add(field); - //NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT)); + //NumberFormat df = new DecimalFormat("00000", new DecimalFormatSymbols(Locale.ROOT)); // LUCENENET specific: Use .ToString formating instead for (int i = 0; i < 10050; i++) { diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs index f6c20dd5c7..703885444f 100644 --- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs +++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextPostingsFormat.cs @@ -23,7 +23,7 @@ namespace Lucene.Net.Codecs.SimpleText /// Tests SimpleText's postings /// [Nightly] // please figure out why I am so horrendously slow! - public class TestSimpleTextPostingsFormat : BasePostingsFormatTestCase // please figure out why I am so horrendously slow! + public class TestSimpleTextPostingsFormat : BasePostingsFormatTestCase { private readonly Codec codec = new SimpleTextCodec(); diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs index be751b3ebc..0c1f50c2e2 100644 --- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs +++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs @@ -29,6 +29,10 @@ protected override Codec GetCodec() return new SimpleTextCodec(); } + + // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct + // context in Visual Studio. This fixes that with the minimum amount of code necessary + // to run them in the correct context without duplicating all of the tests. [Deadlock][Timeout(600000)] public override void TestConcurrentReads() { From afc5a70c01bc5167b8afe432d1c89ef1aba45466 Mon Sep 17 00:00:00 2001 From: Ron Clabo Date: Fri, 19 Feb 2021 10:08:06 -0500 Subject: [PATCH 2/2] Removed obsolete comment, and [Test] override methods no longer needed. --- .../Memory/TestFSTOrdPostingsFormat.cs | 62 ------------------- .../TestSimpleTextStoredFieldsFormat.cs | 3 - 2 files changed, 65 deletions(-) diff --git a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs index 3523216192..3fef554ec5 100644 --- a/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs +++ b/src/Lucene.Net.Tests.Codecs/Memory/TestFSTOrdPostingsFormat.cs @@ -33,67 +33,5 @@ protected override Codec GetCodec() return codec; } - - #region BasePostingsFormatTestCase - // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct - // context in Visual Studio. This fixes that with the minimum amount of code necessary - // to run them in the correct context without duplicating all of the tests. - - [Test] - public override void TestDocsOnly() - { - base.TestDocsOnly(); - } - - [Test] - public override void TestDocsAndFreqs() - { - base.TestDocsAndFreqs(); - } - - [Test] - public override void TestDocsAndFreqsAndPositions() - { - base.TestDocsAndFreqsAndPositions(); - } - - [Test] - public override void TestDocsAndFreqsAndPositionsAndPayloads() - { - base.TestDocsAndFreqsAndPositionsAndPayloads(); - } - - [Test] - public override void TestDocsAndFreqsAndPositionsAndOffsets() - { - base.TestDocsAndFreqsAndPositionsAndOffsets(); - } - - [Test] - public override void TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads() - { - base.TestDocsAndFreqsAndPositionsAndOffsetsAndPayloads(); - } - - [Test] - public override void TestRandom() - { - base.TestRandom(); - } - - #endregion - - #region BaseIndexFileFormatTestCase - // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct - // context in Visual Studio. This fixes that with the minimum amount of code necessary - // to run them in the correct context without duplicating all of the tests. - - [Test] - public override void TestMergeStability() - { - base.TestMergeStability(); - } - - #endregion } } \ No newline at end of file diff --git a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs index 0c1f50c2e2..5f44527b58 100644 --- a/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs +++ b/src/Lucene.Net.Tests.Codecs/SimpleText/TestSimpleTextStoredFieldsFormat.cs @@ -30,9 +30,6 @@ protected override Codec GetCodec() } - // LUCENENET NOTE: Tests in an abstract base class are not pulled into the correct - // context in Visual Studio. This fixes that with the minimum amount of code necessary - // to run them in the correct context without duplicating all of the tests. [Deadlock][Timeout(600000)] public override void TestConcurrentReads() {