diff --git a/core/src/main/java/hudson/model/UpdateSite.java b/core/src/main/java/hudson/model/UpdateSite.java index e6d31442d670cca58f6d63e2cf839994a7752338..a38a696c85f20ba442cd482812ab76f54878e33d 100644 --- a/core/src/main/java/hudson/model/UpdateSite.java +++ b/core/src/main/java/hudson/model/UpdateSite.java @@ -549,7 +549,7 @@ public class UpdateSite { private static final Logger LOGGER = Logger.getLogger(UpdateSite.class.getName()); - public static boolean neverUpdate = Boolean.getBoolean(UpdateCenter.class.getName()+".never"); + public static boolean neverUpdate = Boolean.getBoolean(UpdateCenter.class.getName()+".neverUpdate"); /** * Off by default until we know this is reasonably working. diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java index 297c4336378fe50db2240844e03c42eb07851eae..ffa6621f888c443f83d87ba1f36f0a652e52eccc 100644 --- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java +++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java @@ -240,13 +240,14 @@ public abstract class HudsonTestCase extends TestCase implements RootAction { // load updates from local proxy to avoid network traffic. final String updateCenterUrl = "http://localhost:"+JavaNetReverseProxy.getInstance().localPort+"/update-center.json"; - PersistedList sites = hudson.getUpdateCenter().getSites(); - sites.clear(); - sites.add(new UpdateSite("default", updateCenterUrl)); - // don't waste bandwidth talking to the update center DownloadService.neverUpdate = true; UpdateCenter.neverUpdate = true; + UpdateSite.neverUpdate = true; + + PersistedList sites = hudson.getUpdateCenter().getSites(); + sites.clear(); + sites.add(new UpdateSite("default", updateCenterUrl)); // expose the test instance as a part of URL tree. // this allows tests to use a part of the URL space for itself. diff --git a/test/src/test/groovy/hudson/model/UpdateCenter2Test.groovy b/test/src/test/groovy/hudson/model/UpdateCenter2Test.groovy index 2a896d196e9f8931095cb5652ee29601e064c230..a0df3fa2f8ab652c13d0ffa9a0ec3ce84e930d76 100644 --- a/test/src/test/groovy/hudson/model/UpdateCenter2Test.groovy +++ b/test/src/test/groovy/hudson/model/UpdateCenter2Test.groovy @@ -37,9 +37,10 @@ public class UpdateCenter2Test extends HudsonTestCase { */ void testInstall() { UpdateCenter.neverUpdate = false; + UpdateSite.neverUpdate = false; createWebClient().goTo("/") // load the metadata def job = hudson.updateCenter.getPlugin("changelog-history").deploy().get(); // this seems like one of the smallest plugin println job.status; assertTrue(job.status instanceof Success) } -} \ No newline at end of file +}