Skip to content

Commit ee043ed

Browse files
author
Vladimir Kotal
committed
check tags at the end
1 parent aaef90c commit ee043ed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/FileHistoryCacheTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
import java.util.Iterator;
4545
import java.util.LinkedList;
4646
import java.util.List;
47+
import java.util.Map;
48+
import java.util.TreeMap;
4749

4850
import org.apache.commons.lang3.time.DateUtils;
4951
import org.eclipse.jgit.api.Git;
@@ -242,15 +244,15 @@ public void testStoreAndGetIncrementalTags() throws Exception {
242244
updatedHistoryFromScratch.getHistoryEntries().size(),
243245
"Unexpected number of history entries");
244246

245-
// Verify that the result for the directory is the same as incremental
246-
// reindex.
247+
// Verify that the result for the directory is the same as incremental reindex.
247248
assertSameEntries(updatedHistory.getHistoryEntries(),
248249
updatedHistoryFromScratch.getHistoryEntries(), true);
249250
// Do the same for main.c.
250251
History retrievedUpdatedHistoryMainC = cache.get(main, repo, true);
251252
assertSameEntries(retrievedHistoryMainC.getHistoryEntries(),
252253
retrievedUpdatedHistoryMainC.getHistoryEntries(), false);
253-
// TODO: check tags
254+
assertEquals(Map.of("13:3d386f6bd848", "tag3", "2:585a1b3f2efb", "tag2, tag1, start_of_novel"),
255+
retrievedUpdatedHistoryMainC.getTags());
254256
}
255257

256258
/**

0 commit comments

Comments
 (0)