提交 71c82a55 编写于 作者: K kohsuke

for better test portability, set the JDK

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13173 71c3de6d-444a-0410-be80-ed276b4c234a
上级 cf30417b
......@@ -18,6 +18,7 @@ import hudson.model.UpdateCenter;
import hudson.model.Saveable;
import hudson.model.Run;
import hudson.model.Result;
import hudson.model.JDK;
import hudson.tasks.Mailer;
import hudson.Launcher.LocalLauncher;
import hudson.util.StreamTaskListener;
......@@ -113,6 +114,9 @@ public abstract class HudsonTestCase extends TestCase {
hudson.servletContext.setAttribute("app",hudson);
hudson.servletContext.setAttribute("version","?");
// set a default JDK to be the one that the harness is using.
hudson.getJDKs().add(new JDK("default",System.getProperty("java.home")));
// cause all the descriptors to reload.
// ideally we'd like to reset them to properly emulate the behavior, but that's not possible.
Mailer.DESCRIPTOR.setHudsonUrl(null);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册