From 278cf1c39aa528b4834aa76f5f6175295185b3ca Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 21 Jan 2009 16:36:22 +0000 Subject: Fix test to use exchange option correctly when specified git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@736334 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/sender.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cpp/src/tests/sender.cpp') diff --git a/cpp/src/tests/sender.cpp b/cpp/src/tests/sender.cpp index a4691e17d5..48062315fe 100644 --- a/cpp/src/tests/sender.cpp +++ b/cpp/src/tests/sender.cpp @@ -58,14 +58,15 @@ class Sender : public FailoverManager::Command Sender(const std::string& destination, const std::string& key, uint sendEos); void execute(AsyncSession& session, bool isRetry); private: + const std::string destination; MessageReplayTracker sender; Message message; const uint sendEos; uint sent; }; -Sender::Sender(const std::string& destination, const std::string& key, uint eos) : - sender(10), message(destination, key), sendEos(eos), sent(0) {} +Sender::Sender(const std::string& dest, const std::string& key, uint eos) : + destination(dest), sender(10), message("", key), sendEos(eos), sent(0) {} void Sender::execute(AsyncSession& session, bool isRetry) { @@ -75,11 +76,11 @@ void Sender::execute(AsyncSession& session, bool isRetry) while (getline(std::cin, data)) { message.setData(data); message.getHeaders().setInt("sn", ++sent); - sender.send(message); + sender.send(message, destination); } for (uint i = sendEos; i > 0; --i) { message.setData(EOS); - sender.send(message); + sender.send(message, destination); } } -- cgit v1.2.1