Skip to content
Permalink
Browse files
[JENKINS-29900] Fixed regression in trend detail URLs.
  • Loading branch information
uhafner committed Jun 4, 2016
1 parent db222dc commit 97d3de9c95e496903a1c67e14021d6280fbebcdd
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/test/java/plugins/AbstractAnalysisTest.java
@@ -179,18 +179,18 @@ protected void assertThatProjectPageTrendIsCorrect(final FreeStyleJob job, final
Map<String, Integer> trend = job.getTrendGraphContent(action.getUrl());
assertThat(trend.size(), is(6));

List<String> expectedUrls = new ArrayList<>();
expectedUrls.addAll(trend.keySet());
sort(expectedUrls);
List<String> actualUrls = new ArrayList<>();
actualUrls.addAll(trend.keySet());
sort(actualUrls);

int index = 0;
for (int build = 1; build <= 2; build++) {
int sum = 0;
for (String priority : PRIORITIES) {
String expectedUrl = String.format("^%s%d/%sResult/%s$", prefix, build, action.getUrl(), priority);
String url = expectedUrls.get(index++);
assertThat(url, containsRegexp(expectedUrl));
sum += trend.get(url);
String actualUrl = actualUrls.get(index++);
assertThat(actualUrl, containsRegexp(expectedUrl));
sum += trend.get(actualUrl);
}
assertThat(sum, is(getNumberOfWarnings()));
}

0 comments on commit 97d3de9

Please sign in to comment.