From 7ffae7f9d880ffd692e15895293da3095471aafb Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 10 Mar 2024 11:31:29 -0600 Subject: [PATCH] Test review of TestStoredFieldsFormat --- src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs | 2 +- src/Lucene.Net.Tests/Index/TestStoredFieldsFormat.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs b/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs index 6e31d5281a..2f94be2a55 100644 --- a/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs +++ b/src/Lucene.Net.Tests/Index/TestSnapshotDeletionPolicy.cs @@ -502,7 +502,7 @@ public virtual void TestMissingCommits() // open a new writer w/ KeepOnlyLastCommit policy, so it will delete "s1" // commit. - (new IndexWriter(dir, GetConfig(Random, null))).Dispose(); + new IndexWriter(dir, GetConfig(Random, null)).Dispose(); Assert.IsFalse(SlowFileExists(dir, s1.SegmentsFileName), "snapshotted commit should not exist"); dir.Dispose(); diff --git a/src/Lucene.Net.Tests/Index/TestStoredFieldsFormat.cs b/src/Lucene.Net.Tests/Index/TestStoredFieldsFormat.cs index 6e88e45b4e..a7a980d203 100644 --- a/src/Lucene.Net.Tests/Index/TestStoredFieldsFormat.cs +++ b/src/Lucene.Net.Tests/Index/TestStoredFieldsFormat.cs @@ -20,7 +20,9 @@ namespace Lucene.Net.Index */ using Codec = Lucene.Net.Codecs.Codec; +#pragma warning disable 612, 618 using Lucene3xCodec = Lucene.Net.Codecs.Lucene3x.Lucene3xCodec; +#pragma warning restore 612, 618 /// /// Tests with the default randomized codec. Not really redundant with @@ -47,4 +49,4 @@ public override void TestWriteReadMerge() base.TestWriteReadMerge(); } } -} \ No newline at end of file +}