Skip to content

Commit

Permalink
Fix unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
christ66 committed May 14, 2016
1 parent 0551cd1 commit f88396a
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -53,7 +53,7 @@ public void setUp() throws Exception {
@Test
public void testGetDownstreamBuildWithLimit() throws Exception {
int max_upstream_depth = 3;
int total_proj2_builds = 5;
int total_proj2_builds = 10;
System.setProperty(BuildUtil.class.getCanonicalName() + ".MAX_DOWNSTREAM_DEPTH", String.valueOf(max_upstream_depth));

final FreeStyleProject proj1 = createFreeStyleProject();
Expand All @@ -75,10 +75,10 @@ public void testGetDownstreamBuildWithLimit() throws Exception {
assertEquals("Proj2 does not have the correct number of builds.", total_proj2_builds + 1, proj2.getNextBuildNumber());
RunLoadCounter.prepare(proj2);

assertFalse(RunLoadCounter.assertMaxLoads(proj2, max_upstream_depth - 1, new Callable<Boolean>() {
assertNull(RunLoadCounter.assertMaxLoads(proj2, max_upstream_depth + 2, new Callable<AbstractBuild<?, ?>>() {
@Override
public Boolean call() throws Exception {
return BuildUtil.getDownstreamBuild(proj2, freeStyleBuild) != null;
public AbstractBuild<?, ?> call() throws Exception {
return BuildUtil.getDownstreamBuild(proj2, freeStyleBuild);
}
}));
}
Expand Down

0 comments on commit f88396a

Please sign in to comment.