X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2FtestUtils%2FPingTest.java;h=967fdb2ded062a95e998f640767bd77ecbee4cfc;hb=ab9818f784c71e0f75c1c1dd621da8a3a88cffa4;hp=0d15f2e86c3cf5807c3a969d647b83e061103c89;hpb=07f74d10bddc819f4524e2e0c1a2815eb4e7ec79;p=gigi.git 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));