rpc: reduce sleep time

And add a comment on what it's used for

Change-Id: I6225346979299379e8d566081a2586c7c4525e20
This commit is contained in:
Julien Danjou 2013-08-23 13:39:10 +02:00
parent 748c2da238
commit f861673adf

View File

@ -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)