diff options
author | Gordon Sim <gsim@apache.org> | 2009-01-21 16:36:22 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-01-21 16:36:22 +0000 |
commit | 278cf1c39aa528b4834aa76f5f6175295185b3ca (patch) | |
tree | 06a515cdd1dd3a4d944742b5df3f678ed82aea78 /cpp | |
parent | 6d93918e12caf0fdc736219598076a80c91ae5fd (diff) | |
download | qpid-python-278cf1c39aa528b4834aa76f5f6175295185b3ca.tar.gz |
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
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/tests/sender.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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); } } |