From 2a9b66c3dba5f7fb13c7b4e7442eae2bc5dbc130 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 21 Feb 2012 11:33:51 -0500 Subject: Don't store connection pool in RpcContext. Fix bug 934575. As Chris pointed out in the bug, there is a downside to this approach to fixing the bug, in that a manager will no longer be able to use context.reply(). However, it wasn't being used at all, and it's no loss in functionality. A remote method can still return multiple values (in response to a multicall()) by using yield. Change-Id: I0e5aff2e8a40ffd8390c0e19d89dd17e60a74130 --- nova/tests/rpc/common.py | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/rpc/common.py b/nova/tests/rpc/common.py index 895ea4618..f9727082d 100644 --- a/nova/tests/rpc/common.py +++ b/nova/tests/rpc/common.py @@ -52,13 +52,6 @@ class _BaseRpcTestCase(test.TestCase): "args": {"value": value}}) self.assertEqual(value, result) - def test_call_succeed_despite_multiple_returns(self): - value = 42 - result = self.rpc.call(self.context, 'test', - {"method": "echo_three_times", - "args": {"value": value}}) - self.assertEqual(value + 2, result) - def test_call_succeed_despite_multiple_returns_yield(self): value = 42 result = self.rpc.call(self.context, 'test', @@ -77,15 +70,6 @@ class _BaseRpcTestCase(test.TestCase): self.fail('should only receive one response') self.assertEqual(value + i, x) - def test_multicall_succeed_three_times(self): - value = 42 - result = self.rpc.multicall(self.context, - 'test', - {"method": "echo_three_times", - "args": {"value": value}}) - for i, x in enumerate(result): - self.assertEqual(value + i, x) - def test_multicall_three_nones(self): value = 42 result = self.rpc.multicall(self.context, @@ -209,13 +193,6 @@ class TestReceiver(object): LOG.debug(_("Received %s"), context) return context.to_dict() - @staticmethod - def echo_three_times(context, value): - context.reply(value) - context.reply(value + 1) - context.reply(value + 2) - context.reply(ending=True) - @staticmethod def multicall_three_nones(context, value): yield None -- cgit