You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2009/01/27 16:59:03 UTC

svn commit: r738118 - /qpid/trunk/qpid/cpp/src/tests/txtest.cpp

Author: kpvdr
Date: Tue Jan 27 15:59:03 2009
New Revision: 738118

URL: http://svn.apache.org/viewvc?rev=738118&view=rev
Log:
Modification to txtest to check that the size of the message remains consistent throughout the test.

Modified:
    qpid/trunk/qpid/cpp/src/tests/txtest.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/txtest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/txtest.cpp?rev=738118&r1=738117&r2=738118&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/txtest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/txtest.cpp Tue Jan 27 15:59:03 2009
@@ -157,7 +157,13 @@
                 }
                 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);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org