Skip to content

Commit

Permalink
[JENKINS-21984] Checking stable UC as well. Cannot reproduce certific…
Browse files Browse the repository at this point in the history
…ate problem in test.
  • Loading branch information
jglick committed Feb 28, 2014
1 parent a0d6e52 commit c87b7da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/src/test/java/hudson/model/UpdateCenterTest.java
Expand Up @@ -45,7 +45,8 @@
public class UpdateCenterTest {
@Test public void data() throws Exception {
try {
doData();
doData("http://updates.jenkins-ci.org/update-center.json?version=build");
doData("http://updates.jenkins-ci.org/stable/update-center.json?version=build");
} catch (Exception x) {
if (Boolean.getBoolean("ignore.random.failures")) {
assumeNoException("Might be no Internet connectivity, or might start failing due to expiring certificate through no fault of code changes", x);
Expand All @@ -54,8 +55,8 @@ public class UpdateCenterTest {
}
}
}
private void doData() throws Exception {
URL url = new URL("http://updates.jenkins-ci.org/update-center.json?version=build");
private void doData(String location) throws Exception {
URL url = new URL(location);
String jsonp = IOUtils.toString(url.openStream());
JSONObject json = JSONObject.fromObject(jsonp.substring(jsonp.indexOf('(') + 1, jsonp.lastIndexOf(')')));

Expand Down

0 comments on commit c87b7da

Please sign in to comment.