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 | d499b75a390cbb6a30206f384dd460e642ab7552 (patch) | |
tree | 589f221c955ad7cfa628cd627764a2e03c874764 /cpp/src/tests/publish.cpp | |
parent | bc2ed601a18c8b662337deaca36792f00c22462d (diff) | |
download | qpid-python-d499b75a390cbb6a30206f384dd460e642ab7552.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/qpid@655968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/publish.cpp')
-rw-r--r-- | cpp/src/tests/publish.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/tests/publish.cpp b/cpp/src/tests/publish.cpp index 4cb23782cc..17e3d4e104 100644 --- a/cpp/src/tests/publish.cpp +++ b/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); |