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 | 77a51f37415d8f93579cb3fb5da63705d8dbd5b5 (patch) | |
| tree | 9f749eedad0cbd60b0f22516ea62c22ad7e37a86 /cpp/src/tests/txtest.cpp | |
| parent | 5bec09eaeba0bfbe55d2649ba50801f3faae5642 (diff) | |
| download | qpid-python-77a51f37415d8f93579cb3fb5da63705d8dbd5b5.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/qpid@738118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/txtest.cpp')
| -rw-r--r-- | cpp/src/tests/txtest.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/tests/txtest.cpp b/cpp/src/tests/txtest.cpp index 0c8ce90648..fb1d19ca8a 100644 --- a/cpp/src/tests/txtest.cpp +++ b/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); |
