mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-20 07:22:32 +00:00
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
This commit is contained in:
1 parent
cf30417b80
commit
71c82a553e
1 file changed
+4
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user