diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-10-03 22:08:28 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-10-03 22:08:28 +0000 |
commit | 96ef1f60f18a72408a0a406bba02edf4d16a912d (patch) | |
tree | a0b1e26ca684e6a516ac9c89e71dd16623db0751 | |
parent | 3090c9c6a5d9a7ffdea6c3a97b566ae49f1d39de (diff) | |
download | cmogstored-96ef1f60f18a72408a0a406bba02edf4d16a912d.tar.gz |
Sometimes we need to figure out why connections fail...
-rw-r--r-- | test/test_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index a4da934..9d2dfc2 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -34,6 +34,11 @@ def get_client(tries = 300, port = @port) c.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) return c rescue - t_yield - end while (tries-=1) > 0 + if (tries-=1) > 0 + t_yield + else + warn "get_client Failed on #@host #{port}" + raise + end + end while true end |