From 5fff5b91e6dd0dfcaeed4831181ce164b3956617 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 17 Oct 2024 11:09:50 -0600 Subject: [PATCH] ensure commit just in case --- .../Directories/SyncedFileSystemDirectoryFactoryTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Examine.Test/Examine.Lucene/Directories/SyncedFileSystemDirectoryFactoryTests.cs b/src/Examine.Test/Examine.Lucene/Directories/SyncedFileSystemDirectoryFactoryTests.cs index d06ff70b..5562f7c8 100644 --- a/src/Examine.Test/Examine.Lucene/Directories/SyncedFileSystemDirectoryFactoryTests.cs +++ b/src/Examine.Test/Examine.Lucene/Directories/SyncedFileSystemDirectoryFactoryTests.cs @@ -192,6 +192,10 @@ private void CreateIndex(string rootPath, bool corruptIndex, bool removeSegments // Now delete some items indexer.DeleteFromIndex(new[] { "1", "2" }); + + // double ensure we commit here + indexer.IndexWriter.IndexWriter.Commit(); + indexer.IndexWriter.IndexWriter.WaitForMerges(); }