You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2009/01/21 17:36:22 UTC
svn commit: r736334 - /qpid/trunk/qpid/cpp/src/tests/sender.cpp
Author: gsim
Date: Wed Jan 21 08:36:22 2009
New Revision: 736334
URL: http://svn.apache.org/viewvc?rev=736334&view=rev
Log:
Fix test to use exchange option correctly when specified
Modified:
qpid/trunk/qpid/cpp/src/tests/sender.cpp
Modified: qpid/trunk/qpid/cpp/src/tests/sender.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/sender.cpp?rev=736334&r1=736333&r2=736334&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/sender.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/sender.cpp Wed Jan 21 08:36:22 2009
@@ -58,14 +58,15 @@
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 @@
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);
}
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org