Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Nov 4, 2024
1 parent 50240bd commit 69bacf3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Lucene.Net.Tests/Index/TestIndexWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,7 @@ public virtual void TestCommitWithUserDataOnly()
private Dictionary<string, string> GetLiveCommitData(IndexWriter writer)
{
Dictionary<string, string> data = new Dictionary<string, string>();
// LUCENENET TODO: in a post-4.8 port, this should use LiveCommitData
// LUCENENET UPGRADE TODO: in a post-4.8 port, this should use LiveCommitData
foreach (var ent in writer.CommitData)
{
data.Put(ent.Key, ent.Value);
Expand Down Expand Up @@ -2594,8 +2594,8 @@ public virtual void TestGetCommitData()
public void TestGetCommitDataFromOldSnapshot()
{
Directory dir = NewDirectory();
IndexWriter writer = new IndexWriter(dir, NewSnapshotIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)));
// LUCENENET TODO: in a post-4.8 port, this should use SetLiveCommitData
IndexWriter writer = new IndexWriter(dir, NewSnapshotIndexWriterConfig(TEST_VERSION_CURRENT, null));
// LUCENENET UPGRADE TODO: in a post-4.8 port, this should use SetLiveCommitData
writer.SetCommitData(new Dictionary<string, string>
{
{ "key", "value" },
Expand All @@ -2608,8 +2608,8 @@ public void TestGetCommitDataFromOldSnapshot()
writer.Dispose();

// Modify the commit data and commit on close so the most recent commit data is different
writer = new IndexWriter(dir, NewSnapshotIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random)));
// LUCENENET TODO: in a post-4.8 port, this should use SetLiveCommitData
writer = new IndexWriter(dir, NewSnapshotIndexWriterConfig(TEST_VERSION_CURRENT, null));
// LUCENENET UPGRADE TODO: in a post-4.8 port, this should use SetLiveCommitData
writer.SetCommitData(new Dictionary<string, string>()
{
{ "key", "value2" },
Expand All @@ -2623,7 +2623,7 @@ public void TestGetCommitDataFromOldSnapshot()
writer =
new IndexWriter(
dir,
NewSnapshotIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random))
NewSnapshotIndexWriterConfig(TEST_VERSION_CURRENT, null)
.SetOpenMode(OpenMode.APPEND)
.SetIndexCommit(indexCommit));
assertEquals("value", GetLiveCommitData(writer)["key"]);
Expand Down

0 comments on commit 69bacf3

Please sign in to comment.