Skip to content

Commit 6dcc050

Browse files
committed
add comments
1 parent 5c241e6 commit 6dcc050

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,9 @@ void testAnnotationPositive(Pair<String, List<String>> pair) throws Exception {
449449
assertEquals(pair.getValue(), revisions);
450450
}
451451

452+
/**
453+
* Test special case of repository with no tags, in this case empty repository.
454+
*/
452455
@Test
453456
void testBuildTagListEmpty() throws Exception {
454457
Path repositoryRootPath = Files.createDirectory(Path.of(RuntimeEnvironment.getInstance().getSourceRootPath(),
@@ -463,6 +466,9 @@ void testBuildTagListEmpty() throws Exception {
463466
IOUtils.removeRecursive(repositoryRootPath);
464467
}
465468

469+
/**
470+
* Extract the tags from the original repository. It already contains one tag.
471+
*/
466472
@Test
467473
void testBuildTagListInitial() throws Exception {
468474
MercurialRepository hgRepo = (MercurialRepository) RepositoryFactory.getRepository(repositoryRoot);
@@ -476,6 +482,10 @@ void testBuildTagListInitial() throws Exception {
476482
assertEquals(expectedTags, tags);
477483
}
478484

485+
/**
486+
* Clone the original repository, add new tag, check that the extracted tags contain the pre-existing
487+
* and new one.
488+
*/
479489
@Test
480490
void testBuildTagListOneMore() throws Exception {
481491
Path repositoryRootPath = Files.createDirectory(Path.of(RuntimeEnvironment.getInstance().getSourceRootPath(),

0 commit comments

Comments
 (0)