summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-10-15 21:38:07 +0000
committerTed Ross <tross@apache.org>2009-10-15 21:38:07 +0000
commit700636714d25b073bdfea2d982b5f67f11b240e9 (patch)
treeed25120fe901fb661f45284bf8c99653a9b065a8 /qpid/cpp/bindings
parent94e5a0ccf80d9e5061bceebf8f9caaeae8af4a5e (diff)
downloadqpid-python-700636714d25b073bdfea2d982b5f67f11b240e9.tar.gz
Bug fix: Console sent get-requests (by objectId) to all agents, not just the agent
identified in the objectId. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@825672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings')
-rwxr-xr-xqpid/cpp/bindings/qmf/tests/python_console.py11
-rwxr-xr-xqpid/cpp/bindings/qmf/tests/ruby_console_test.rb15
2 files changed, 26 insertions, 0 deletions
diff --git a/qpid/cpp/bindings/qmf/tests/python_console.py b/qpid/cpp/bindings/qmf/tests/python_console.py
index bcd3063fe3..e7fa78f3a2 100755
--- a/qpid/cpp/bindings/qmf/tests/python_console.py
+++ b/qpid/cpp/bindings/qmf/tests/python_console.py
@@ -140,6 +140,17 @@ class QmfInteropTests(TestBase010):
self.assertEqual(result.status, 0)
self.assertEqual(result.userid, "guest")
+ def test_D_get_by_object_id(self):
+ self.startQmf()
+ qmf = self.qmf
+
+ parents = qmf.getObjects(_class="parent")
+ self.assertEqual(len(parents), 1)
+ parent = parents[0]
+
+ newList = qmf.getObjects(_objectId=parent.getObjectId())
+ self.assertEqual(len(newList), 1)
+
def getProperty(self, msg, name):
for h in msg.headers:
if hasattr(h, name): return getattr(h, name)
diff --git a/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb b/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
index b72c8e3806..e0440367c5 100755
--- a/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
+++ b/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
@@ -186,6 +186,21 @@ class ConsoleTest < ConsoleTestBase
assert_equal(result.args.userid, "anonymous")
end
+ def test_D_get_by_object_id
+ parent = @qmfc.object(:class => "parent")
+ assert(parent, "Number of parent objects")
+
+ list = @qmfc.objects(:object_id => parent.object_id)
+ assert_equal(list.size, 1)
+
+ bad_oid = Qmf::ObjectId.new
+ list = @qmfc.objects(:object_id => bad_oid)
+ assert_equal(list.size, 0)
+
+ # TODO: test a bad_oid that has an agent-bank that is not associated with an attached agent.
+
+ end
+
end
app = ConsoleTest.new