summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-01-20 20:33:04 +0000
committerTed Ross <tross@apache.org>2009-01-20 20:33:04 +0000
commit9b67b6a5116ecc3ce9d8385e951f6c19252b2935 (patch)
tree0381827fdaca25bbc5091fc5d1811dac4447b1e4
parentcd99f2b8454e6be2f1d05f9808096c280e843218 (diff)
downloadqpid-python-9b67b6a5116ecc3ce9d8385e951f6c19252b2935.tar.gz
QPID-1601 Ruby test patch from Justin Ross
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736094 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--ruby/tests/qmf.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/ruby/tests/qmf.rb b/ruby/tests/qmf.rb
index 8bd9218366..b0ee19c3d5 100644
--- a/ruby/tests/qmf.rb
+++ b/ruby/tests/qmf.rb
@@ -28,8 +28,10 @@ class QmfTest < Test::Unit::TestCase
# Make sure errors in threads lead to a noisy death of the test
Thread.abort_on_exception = true
- sock = TCPSocket.new(ENV.fetch("QMF_TEST_HOST", 'localhost'),
- ENV.fetch("QMF_TEST_PORT", 5672))
+ host = ENV.fetch("QMF_TEST_HOST", 'localhost')
+ port = ENV.fetch("QMF_TEST_PORT", 5672)
+
+ sock = TCPSocket.new(host, port)
@conn = Qpid::Connection.new(sock)
@conn.start()
@@ -39,7 +41,7 @@ class QmfTest < Test::Unit::TestCase
# It's a bit odd that we're using two connections but that's the way
# the python one works afaict.
@qmf = Qpid::Qmf::Session.new()
- @qmf_broker = @qmf.add_broker("amqp://localhost:5672")
+ @qmf_broker = @qmf.add_broker("amqp://%s:%d" % [host, port])
brokers = @qmf.objects(:class => "broker")
assert_equal(1, brokers.length)