diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2009-01-27 15:59:03 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2009-01-27 15:59:03 +0000 |
| commit | 09ce240419fec8a91a37c05d94b3e32780f04ab0 (patch) | |
| tree | 57549e142616eba95b7efb6bab0aabb4ad39518d /qpid/cpp/src | |
| parent | 1991bb25b35c257940c84f052ed6ab0032d375ad (diff) | |
| download | qpid-python-09ce240419fec8a91a37c05d94b3e32780f04ab0.tar.gz | |
Modification to txtest to check that the size of the message remains consistent throughout the test.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@738118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/tests/txtest.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/txtest.cpp b/qpid/cpp/src/tests/txtest.cpp index 0c8ce90648..fb1d19ca8a 100644 --- a/qpid/cpp/src/tests/txtest.cpp +++ b/qpid/cpp/src/tests/txtest.cpp @@ -157,7 +157,13 @@ struct Transfer : public Client, public Runnable } for (uint m = 0; m < opts.msgsPerTx; m++) { in = lq.pop(); - out.setData(in.getData()); + std::string& data = in.getData(); + if (data.size() != opts.size) { + std::ostringstream oss; + oss << "Message size incorrect: size=" << in.getData().size() << "; expected " << opts.size; + throw std::runtime_error(oss.str()); + } + out.setData(data); out.getMessageProperties().setCorrelationId(in.getMessageProperties().getCorrelationId()); out.getDeliveryProperties().setDeliveryMode(in.getDeliveryProperties().getDeliveryMode()); session.messageTransfer(arg::content=out, arg::acceptMode=1); |
