Skip to content

Commit

Permalink
BUG: Lucene.Net.Tests.Facet.Taxonomy.Directory.TestDirectoryTaxonomyW…
Browse files Browse the repository at this point in the history
…riter::TestCommitUserData(): Corrected issue with asserting dictionary contents rather than checking for null on the exception message (apache#259)
  • Loading branch information
NightOwl888 committed Feb 4, 2021
1 parent 213f54f commit 2f770f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ public virtual void TestCommitUserData()
taxoWriter.Commit();

// verify taxoWriter.getCommitData()
Assert.NotNull(DirectoryTaxonomyWriter.INDEX_EPOCH + " not found in taoxWriter.commitData", taxoWriter.CommitData[DirectoryTaxonomyWriter.INDEX_EPOCH]);
Assert.IsTrue(taxoWriter.CommitData.ContainsKey(DirectoryTaxonomyWriter.INDEX_EPOCH), DirectoryTaxonomyWriter.INDEX_EPOCH + " not found in taoxWriter.commitData");
taxoWriter.Dispose();

r = DirectoryReader.Open(dir);
readUserCommitData = r.IndexCommit.UserData;
Assert.NotNull(DirectoryTaxonomyWriter.INDEX_EPOCH + " not found in commitData", readUserCommitData[DirectoryTaxonomyWriter.INDEX_EPOCH]);
Assert.IsTrue(readUserCommitData.ContainsKey(DirectoryTaxonomyWriter.INDEX_EPOCH), DirectoryTaxonomyWriter.INDEX_EPOCH + " not found in taoxWriter.commitData");
r.Dispose();

dir.Dispose();
Expand Down

0 comments on commit 2f770f3

Please sign in to comment.