/**
* Make sure we are actually listing tags correctly.
*/
@Bug(11933)
public void testListTags() throws Exception {
Proc p = runSvnServe(getClass().getResource("JENKINS-11933.zip"));
try {
ListSubversionTagsParameterDefinition def = new ListSubversionTagsParameterDefinition("FOO", "svn://localhost/", null, "", "", "", false, false);
List<String> tags = def.getTags(null);
List<String> expected = Arrays.asList("trunk", "tags/a", "tags/b", "tags/c");
if (!expected.equals(tags)) {
// retry. Maybe the svnserve just didn't start up correctly, yet
System.out.println("First attempt failed. Retrying.");
Thread.sleep(3000L);
tags = def.getTags(null);
if (!expected.equals(tags)) {
/* Just throws SVNException: svn: E210003: connection refused by the server:
dumpRepositoryContents();
*/
if (tags.size() == 1 && tags.get(0).startsWith("!")) {
System.err.println("failed to contact SVN server; skipping test");
return;
}
Assert.fail("Expected " + expected + ", but got " + tags);
}
}
} finally {
p.kill();
}
}