about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-10-03 22:08:28 +0000
committerEric Wong <normalperson@yhbt.net>2012-10-03 22:08:28 +0000
commit96ef1f60f18a72408a0a406bba02edf4d16a912d (patch)
treea0b1e26ca684e6a516ac9c89e71dd16623db0751
parent3090c9c6a5d9a7ffdea6c3a97b566ae49f1d39de (diff)
downloadcmogstored-96ef1f60f18a72408a0a406bba02edf4d16a912d.tar.gz
Sometimes we need to figure out why connections fail...
-rw-r--r--test/test_helper.rb9
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