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 +}