From b7ec374e76e162e4c26ba6df35aa9f0aca8277f0 Mon Sep 17 00:00:00 2001 From: Vladimir Kotal Date: Mon, 9 Sep 2024 12:02:49 +0200 Subject: [PATCH] one more --- .../indexer/history/MercurialRepositoryTest.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/opengrok-indexer/src/test/java/org/opengrok/indexer/history/MercurialRepositoryTest.java b/opengrok-indexer/src/test/java/org/opengrok/indexer/history/MercurialRepositoryTest.java index 11a3e4470a3..dd2917f2f04 100644 --- a/opengrok-indexer/src/test/java/org/opengrok/indexer/history/MercurialRepositoryTest.java +++ b/opengrok-indexer/src/test/java/org/opengrok/indexer/history/MercurialRepositoryTest.java @@ -47,7 +47,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Date; import java.util.List; import java.util.Objects; import java.util.Set; @@ -476,4 +475,18 @@ void testBuildTagListInitial() throws Exception { expectedTags.add(tagEntry); assertEquals(expectedTags, tags); } + + @Test + void testBuildTagListOneMore() throws Exception { + MercurialRepository hgRepo = (MercurialRepository) RepositoryFactory.getRepository(repositoryRoot); + assertNotNull(hgRepo); + runHgCommand(repositoryRoot, "tag", "foo"); + hgRepo.buildTagList(new File(hgRepo.getDirectoryName()), CommandTimeoutType.INDEXER); + var tags = hgRepo.getTagList(); + assertNotNull(tags); + assertEquals(2, tags.size()); + Set expectedTags = Set.of(new MercurialTagEntry(7, "start_of_novel"), + new MercurialTagEntry(9, "foo")); + assertEquals(expectedTags, tags); + } }