提交 3ddef512 编写于 作者: J Jesse Glick

Fix of JENKINS-8408 broke some tests of workspace-based polling; disable the...

Fix of JENKINS-8408 broke some tests of workspace-based polling; disable the fix when inside a test, for better predictability.
(Ideally Jenkins would actually detect whether there was a *plan* to connect a slave of a given name.)
上级 5e893731
......@@ -1380,7 +1380,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
// give time for slaves to come online if we are right after reconnection (JENKINS-8408)
long running = Jenkins.getInstance().getInjector().getInstance(Uptime.class).getUptime();
long remaining = TimeUnit2.MINUTES.toMillis(10)-running;
if (remaining>0) {
if (remaining>0 && /* this logic breaks tests of polling */!Functions.getIsUnitTest()) {
listener.getLogger().print(Messages.AbstractProject_AwaitingWorkspaceToComeOnline(remaining/1000));
listener.getLogger().println( " (" + workspaceOfflineReason.name() + ")");
return NO_CHANGES;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册