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 dd2917f2f04..44a7eac83a7 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 @@ -478,6 +478,10 @@ void testBuildTagListInitial() throws Exception { @Test void testBuildTagListOneMore() throws Exception { + Path repositoryRootPath = Files.createDirectory(Path.of(RuntimeEnvironment.getInstance().getSourceRootPath(), + "addedTagTest")); + File repositoryRoot = repositoryRootPath.toFile(); + runHgCommand(this.repositoryRoot, "clone", this.repositoryRoot.toString(), repositoryRootPath.toString()); MercurialRepository hgRepo = (MercurialRepository) RepositoryFactory.getRepository(repositoryRoot); assertNotNull(hgRepo); runHgCommand(repositoryRoot, "tag", "foo"); @@ -488,5 +492,6 @@ void testBuildTagListOneMore() throws Exception { Set expectedTags = Set.of(new MercurialTagEntry(7, "start_of_novel"), new MercurialTagEntry(9, "foo")); assertEquals(expectedTags, tags); + IOUtils.removeRecursive(repositoryRootPath); } }