Created
November 3, 2011 22:13
-
-
Save vishvananda/1337956 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nova/tests/fake_flags.py b/nova/tests/fake_flags.py | |
index 0732164..7d37960 100644 | |
--- a/nova/tests/fake_flags.py | |
+++ b/nova/tests/fake_flags.py | |
@@ -23,7 +23,8 @@ FLAGS = flags.FLAGS | |
flags.DECLARE('volume_driver', 'nova.volume.manager') | |
FLAGS['volume_driver'].SetDefault('nova.volume.driver.FakeISCSIDriver') | |
FLAGS['connection_type'].SetDefault('fake') | |
-FLAGS['fake_rabbit'].SetDefault(True) | |
+FLAGS['fake_rabbit'].SetDefault(False) | |
+FLAGS['rabbit_password'].SetDefault("secrete") | |
flags.DECLARE('auth_driver', 'nova.auth.manager') | |
FLAGS['auth_driver'].SetDefault('nova.auth.dbdriver.DbDriver') | |
flags.DECLARE('network_size', 'nova.network.manager') | |
diff --git a/nova/tests/test_rpc_common.py b/nova/tests/test_rpc_common.py | |
index 4ab4e8a..49dd22d 100644 | |
--- a/nova/tests/test_rpc_common.py | |
+++ b/nova/tests/test_rpc_common.py | |
@@ -18,6 +18,7 @@ | |
""" | |
Unit Tests for remote procedure calls shared between all implementations | |
""" | |
+import eventlet | |
from nova import context | |
from nova import log as logging | |
@@ -152,6 +153,25 @@ class _BaseRpcTestCase(test.TestCase): | |
self.assertEqual(value, result) | |
+ def test_many_nested_calls(self): | |
+ value = 42 | |
+ pile = eventlet.GreenPile() | |
+ for x in xrange(100): | |
+ pile.spawn(self.test_nested_calls), | |
+ for result in pile: | |
+ pass | |
+ | |
+ def test_many_calls(self): | |
+ value = 42 | |
+ pile = eventlet.GreenPile() | |
+ for x in xrange(100): | |
+ pile.spawn(self.rpc.call, | |
+ self.context, | |
+ 'test', {"method": "echo", | |
+ "args": {"value": value}}) | |
+ for result in pile: | |
+ self.assertEqual(value, result) | |
+ | |
class TestReceiver(object): | |
"""Simple Proxy class so the consumer has methods to call. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment