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

[JENKINS-21984] Checking stable UC as well. Cannot reproduce certificate problem in test.

上级 a0d6e528
......@@ -45,7 +45,8 @@ import org.junit.Test;
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);
......@@ -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(')')));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册