diff options
| author | Gordon Sim <gsim@apache.org> | 2008-05-13 18:46:00 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-05-13 18:46:00 +0000 |
| commit | 433c13dd51170b93845fba0863fbd34b16941f5a (patch) | |
| tree | 2f486d7120679cc60ea3f6acc1387bc3b03dcf2a /qpid/cpp/src/tests/publish.cpp | |
| parent | 49582856d6942c1bc744e1c08e4b955646f1dc82 (diff) | |
| download | qpid-python-433c13dd51170b93845fba0863fbd34b16941f5a.tar.gz | |
Minor change to tests to use correlation id rather than body for identifying messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@655968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/publish.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/publish.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/publish.cpp b/qpid/cpp/src/tests/publish.cpp index 4cb23782cc..17e3d4e104 100644 --- a/qpid/cpp/src/tests/publish.cpp +++ b/qpid/cpp/src/tests/publish.cpp @@ -69,6 +69,13 @@ struct Client session = connection.newSession(ASYNC); } + std::string id(uint i) + { + std::stringstream s; + s << "msg" << i; + return s.str(); + } + void publish() { Message msg(string(opts.size, 'X'), opts.routingKey); @@ -76,8 +83,7 @@ struct Client msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); for (uint i = 0; i < opts.count; i++) { - const_cast<std::string&>(msg.getData()).replace(0, sizeof(uint32_t), - reinterpret_cast<const char*>(&i), sizeof(uint32_t)); + msg.getMessageProperties().setCorrelationId(id(i + 1)); session.messageTransfer(arg::destination=opts.destination, arg::content=msg, arg::acceptMode=1); |
