提交 b39a361a 编写于 作者: K kohsuke

PeriodicWork change broke the tests, because the timer registration wasn't kicking in

git-svn-id: https://hudson.dev.java.net/svn/hudson/branches/rc@16380 71c3de6d-444a-0410-be80-ed276b4c234a
上级 527eee53
......@@ -192,8 +192,6 @@ public final class WebAppMain implements ServletContextListener {
throw new Error(e);
}
Trigger.init(); // start running trigger
// trigger the loading of changelogs in the background,
// but give the system 10 seconds so that the first page
// can be served quickly
......
......@@ -557,6 +557,8 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
t.printStackTrace();
}
}
Trigger.init(); // start running trigger
}
public TcpSlaveAgentListener getTcpSlaveAgentListener() {
......
......@@ -37,9 +37,9 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/**
* @author Kohsuke Kawaguchi
......@@ -197,8 +197,13 @@ public class NodeProvisionerTest extends HudsonTestCase {
private void verifySuccessfulCompletion(List<Future<FreeStyleBuild>> builds) throws Exception {
System.out.println("Waiting for a completion");
for (Future<FreeStyleBuild> f : builds) {
FreeStyleBuild b = f.get();// if it's taking too long, abort.
assertBuildStatus(Result.SUCCESS,b);
try {
assertBuildStatus(Result.SUCCESS, f.get(1, TimeUnit.MINUTES));
} catch (TimeoutException e) {
// time out so that the automated test won't hang forever, even when we have bugs
System.out.println("Build didn't complete in time");
throw e;
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册