From d8c0d385f45a953d683203f24bda90e679d98f25 Mon Sep 17 00:00:00 2001
From: Sree Kuchibhotla <sreek@google.com>
Date: Tue, 3 May 2016 17:12:45 -0700
Subject: [PATCH] Fix a bug in stress client code

---
 src/python/grpcio/tests/stress/client.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/python/grpcio/tests/stress/client.py b/src/python/grpcio/tests/stress/client.py
index a733741b73..e2e016760c 100644
--- a/src/python/grpcio/tests/stress/client.py
+++ b/src/python/grpcio/tests/stress/client.py
@@ -117,7 +117,10 @@ def run_test(args):
   for runner in runners:
     runner.start()
   try:
-    raise exception_queue.get(block=True, timeout=args.test_duration_secs)
+    timeout_secs = args.test_duration_secs
+    if timeout_secs < 0:
+      timeout_secs = None
+    raise exception_queue.get(block=True, timeout=timeout_secs)
   except Queue.Empty:
     # No exceptions thrown, success
     pass
-- 
GitLab