X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=tests%2Forg%2Fcacert%2Fgigi%2FtestUtils%2FPingTest.java;h=b8c0d9105211bae9b4c699601f803df84d213959;hp=6c57d76dcd80d30173f6b00f4c2ff133e7a1e18c;hb=99ef9ee7f8d4a2332e4f08c7a0b23cc84966f555;hpb=220e929f188697e632a2af03808b46644ec79a2d diff --git a/tests/org/cacert/gigi/testUtils/PingTest.java b/tests/org/cacert/gigi/testUtils/PingTest.java index 6c57d76d..b8c0d910 100644 --- a/tests/org/cacert/gigi/testUtils/PingTest.java +++ b/tests/org/cacert/gigi/testUtils/PingTest.java @@ -27,7 +27,8 @@ public abstract class PingTest extends ClientTest { protected void waitForPings(int count) throws SQLException, InterruptedException { PreparedStatement ps = DatabaseConnection.getInstance().prepare("SELECT COUNT(*) FROM domainPinglog"); - while (true) { + long start = System.currentTimeMillis(); + while (System.currentTimeMillis() - start < 10000) { ResultSet rs = ps.executeQuery(); rs.next(); if (rs.getInt(1) >= count) {