Skip to content

Commit a061d3b

Browse files
committed
adjust top-level comment, add branch assert
1 parent 1a399c0 commit a061d3b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,14 @@ void testBuildTagListInitial() throws Exception {
483483
}
484484

485485
/**
486-
* Clone the original repository, create branch and add tag to the branch, switch back to the original branch,
487-
* add new tag, check that the extracted tags contain the pre-existing and new one
488-
* but not the non-default branch tag.
486+
* 1. Clone the original repository
487+
* 2. create branch and add tag to the branch
488+
* 3. switch back to the original branch, add new tag
489+
* 4. check that the extracted tags contain the pre-existing and new one but not the non-default branch tag.
490+
* 5. add another tag
491+
* 6. switch to the non-default branch
492+
* 7. check that the extracted tags consist of the tags added to the default branch before the branch point
493+
* and also the tags added in that branch
489494
*/
490495
@Test
491496
void testBuildTagListOneMore() throws Exception {
@@ -534,6 +539,7 @@ void testBuildTagListOneMore() throws Exception {
534539
// The repository object has to be recreated to reflect the branch switch.
535540
hgRepo = (MercurialRepository) RepositoryFactory.getRepository(repositoryRoot);
536541
assertNotNull(hgRepo);
542+
assertEquals(myBranch, hgRepo.getBranch());
537543
hgRepo.buildTagList(new File(hgRepo.getDirectoryName()), CommandTimeoutType.INDEXER);
538544
tags = hgRepo.getTagList();
539545
assertNotNull(tags);

0 commit comments

Comments
 (0)