Skip to content

Commit 81f7d9b

Browse files
committed
Broaden the assertion to avoid false test failures
1 parent 5a4f072 commit 81f7d9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/hudson/plugins/git/util/CandidateRevisionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void testChooseWithMultipleTag() throws Exception {
111111
Collection<Revision> candidateRevisions = buildChooser.getCandidateRevisions(false, "tag/*", testGitClient2, null, buildData, context);
112112
assertEquals(1, candidateRevisions.size());
113113
String name = candidateRevisions.iterator().next().getBranches().iterator().next().getName();
114-
assertTrue("Wrong name: '" + name + "'", name.equals("origin/tags/tag/c") || name.equals("origin/tags/tag/b"));
114+
assertTrue("Expected .*/tags/b or .*/tags/c, was '" + name + "'", name.matches("(origin|refs)/tags/tag/[bc]"));
115115
}
116116

117117
/**

0 commit comments

Comments
 (0)