Skip to content
Permalink
Browse files
vcs: make RepositoryTests deterministic
Reviewed-by: rwestberg
  • Loading branch information
edvbld committed Mar 16, 2021
1 parent 763af0c commit 79e205655ad9bda27c462fe3c11cc9ec2ded1ecb
Showing with 7 additions and 7 deletions.
  1. +7 −7 vcs/src/test/java/org/openjdk/skara/vcs/RepositoryTests.java
@@ -2963,19 +2963,19 @@ void testCommitMetadataWithBranchesWithGit() throws IOException {

metadata = r.commitMetadataFor(List.of(r.defaultBranch(), b1));
assertEquals(2, metadata.size());
assertEquals(second, metadata.get(0).hash());
assertEquals(first, metadata.get(1).hash());
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(first)));
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(second)));

metadata = r.commitMetadataFor(List.of(r.defaultBranch(), b2));
assertEquals(2, metadata.size());
assertEquals(third, metadata.get(0).hash());
assertEquals(first, metadata.get(1).hash());
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(first)));
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(third)));

metadata = r.commitMetadataFor(List.of(r.defaultBranch(), b1, b2));
assertEquals(3, metadata.size());
assertEquals(second, metadata.get(0).hash());
assertEquals(third, metadata.get(1).hash());
assertEquals(first, metadata.get(2).hash());
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(first)));
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(second)));
assertTrue(metadata.stream().anyMatch(c -> c.hash().equals(third)));
}
}
}

1 comment on commit 79e2056

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 79e2056 Mar 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.