X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2FtestUtils%2FPingTest.java;h=967fdb2ded062a95e998f640767bd77ecbee4cfc;hp=0d15f2e86c3cf5807c3a969d647b83e061103c89;hb=4de35d0ba81eadeceb437dace9e06ef59caa2b39;hpb=81d9d22a079f23d2930936692b7ed962c2544adc diff --git a/tests/org/cacert/gigi/testUtils/PingTest.java b/tests/org/cacert/gigi/testUtils/PingTest.java index 0d15f2e8..967fdb2d 100644 --- a/tests/org/cacert/gigi/testUtils/PingTest.java +++ b/tests/org/cacert/gigi/testUtils/PingTest.java @@ -51,8 +51,9 @@ public abstract class PingTest extends ClientTest { openConnection.setDoOutput(true); openConnection.getOutputStream().write(content.getBytes("UTF-8")); openConnection.getHeaderField("Location"); - if (((HttpURLConnection) openConnection).getResponseCode() != 302) { - throw new Error(IOUtils.readURL(openConnection)); + int code = ((HttpURLConnection) openConnection).getResponseCode(); + if (code != 302) { + throw new Error("Code was: " + code + "\ncontent was: " + IOUtils.readURL(openConnection)); } String newcontent = IOUtils.readURL(get(DomainOverview.PATH));