Skip to content

Commit

Permalink
[JENKINS-29900] Fixed regression in trend detail URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Jun 4, 2016
1 parent db222dc commit 97d3de9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/java/plugins/AbstractAnalysisTest.java
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 97d3de9

Please sign in to comment.