From f861673adf66106afe2d629d30c708c7a259999e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 23 Aug 2013 13:39:10 +0200 Subject: [PATCH] rpc: reduce sleep time And add a comment on what it's used for Change-Id: I6225346979299379e8d566081a2586c7c4525e20 --- tests/publisher/test_rpc_publisher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/publisher/test_rpc_publisher.py b/tests/publisher/test_rpc_publisher.py index 10f37e50e..201b44686 100644 --- a/tests/publisher/test_rpc_publisher.py +++ b/tests/publisher/test_rpc_publisher.py @@ -276,7 +276,8 @@ class TestPublish(base.TestCase): def faux_cast_wait(context, topic, msg): self.stubs.Set(oslo_rpc, 'cast', faux_cast_go) - eventlet.sleep(1) + # Sleep to simulate concurrency and allow other threads to work + eventlet.sleep(0) self.published.append((topic, msg)) self.stubs.Set(oslo_rpc, 'cast', faux_cast_wait)