summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2011-01-13 19:10:07 +0000
committerTed Ross <tross@apache.org>2011-01-13 19:10:07 +0000
commit51b79cafaa57b231f3fd87e29fe190a442bd8a81 (patch)
treed87de59e5b1bb18ac40ed5062cf486e8cb35ce7c /qpid/cpp/bindings
parent077ff9e2061a7175ae346de36cb801afefd1762a (diff)
downloadqpid-python-51b79cafaa57b231f3fd87e29fe190a442bd8a81.tar.gz
In qmfengine, if a method call or method response requires a buffer larger than the
static buffer used for communication, allocate a large-enough buffer temporarily from the heap. A test is included to verify large-buffer behavior. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1058709 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings')
-rwxr-xr-xqpid/cpp/bindings/qmf/tests/ruby_console_test.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb b/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
index 1c4a0a2105..972d5977b8 100755
--- a/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
+++ b/qpid/cpp/bindings/qmf/tests/ruby_console_test.rb
@@ -354,6 +354,43 @@ class ConsoleTest < ConsoleTestBase
end
end
+ def test_H_map_list_method_call_big
+ parent = @qmfc.object(:class => "parent")
+ assert(parent, "Number of 'parent' objects")
+
+ big_string = ""
+ segment = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ for idx in 1...1500
+ big_string = big_string + segment
+ end
+
+ inMap = {'aLong' => 9999999999,
+ 'aInt' => 54321,
+ 'aSigned' => -666,
+ 'aString' => big_string,
+ 'another' => big_string,
+ 'aFloat' => 3.1415,
+ 'aList' => ['x', -1, 'y', 2],
+ 'abool' => false}
+
+ inList = ['aString', 1, -1, 2.7182, {'aMap'=> -8}, true]
+
+ result = parent.test_map_list(inMap, inList)
+ assert_equal(result.status, 0)
+ assert_equal(result.text, "OK")
+
+ # verify returned values
+ assert_equal(inMap.length, result.args['outMap'].length)
+ result.args['outMap'].each do |k,v|
+ assert_equal(inMap[k], v)
+ end
+
+ assert_equal(inList.length, result.args['outList'].length)
+ for idx in 0...inList.length
+ assert_equal(inList[idx], result.args['outList'][idx])
+ end
+ end
+
end
app = ConsoleTest.new