Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Jul 19, 2024
1 parent 7c17e5d commit 328dcd8
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ namespace Examine.Test.Examine.Lucene.Directories
[TestFixture]
public class SyncedFileSystemDirectoryFactoryTests : ExamineBaseTest
{
private readonly ILogger _logger;

public SyncedFileSystemDirectoryFactoryTests()
{
_logger = LoggerFactory.CreateLogger<SyncedFileSystemDirectoryFactoryTests>();
}

[TestCase(true, false, SyncedFileSystemDirectoryFactory.CreateResult.NotClean | SyncedFileSystemDirectoryFactory.CreateResult.Fixed | SyncedFileSystemDirectoryFactory.CreateResult.OpenedSuccessfully)]
[TestCase(true, true, SyncedFileSystemDirectoryFactory.CreateResult.MissingSegments | SyncedFileSystemDirectoryFactory.CreateResult.CorruptCreatedNew, Ignore = "testing")]
[TestCase(false, false, SyncedFileSystemDirectoryFactory.CreateResult.OpenedSuccessfully, Ignore = "testing")]
Expand Down Expand Up @@ -123,8 +116,10 @@ public void Given_CorruptMainIndex_And_HealthyLocalIndex_When_CreatingDirectory_

private void CreateIndex(string rootPath, bool corruptIndex, bool removeSegments)
{
var logger = LoggerFactory.CreateLogger<SyncedFileSystemDirectoryFactoryTests>();

var indexPath = Path.Combine(rootPath, TestIndex.TestIndexName);
_logger.LogInformation("Creating index at " + indexPath);
logger.LogInformation("Creating index at " + indexPath);

using var luceneDir = FSDirectory.Open(indexPath);

Expand All @@ -149,7 +144,7 @@ private void CreateIndex(string rootPath, bool corruptIndex, bool removeSegments
});
}

_logger.LogInformation("Created index at " + luceneDir.Directory);
logger.LogInformation("Created index at " + luceneDir.Directory);
Assert.IsTrue(DirectoryReader.IndexExists(luceneDir));

if (corruptIndex)
Expand Down

0 comments on commit 328dcd8

Please sign in to comment.