提交 b9903dd8 编写于 作者: J Jesse Glick

Jenkins core does not automatically call Descriptor.load(), so JenkinsRule should not do so either.

Reverts 66528e43 so as to make test cases more faithful to real behavior.
上级 264bd1a2
......@@ -104,7 +104,6 @@ import hudson.tasks.Ant;
import hudson.tasks.BuildWrapper;
import hudson.tasks.BuildWrapperDescriptor;
import hudson.tasks.Builder;
import hudson.tasks.Mailer;
import hudson.tasks.Maven;
import hudson.tasks.Publisher;
import hudson.tools.ToolProperty;
......@@ -354,14 +353,7 @@ public class JenkinsRule implements TestRule, MethodRule, RootAction {
// this allows tests to use a part of the URL space for itself.
jenkins.getActions().add(this);
// cause all the descriptors to reload.
// ideally we'd like to reset them to properly emulate the behavior, but that's not possible.
Mailer.DescriptorImpl desc = Mailer.descriptor();
// prevent NPE with eclipse
if (desc != null) Mailer.descriptor().setHudsonUrl(getURL().toString());
JenkinsLocationConfiguration.get().setUrl(getURL().toString());
for( Descriptor d : jenkins.getExtensionList(Descriptor.class) )
d.load();
setUpTimeout();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册