diff options
| author | Alan Conway <aconway@apache.org> | 2008-05-23 13:39:07 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-05-23 13:39:07 +0000 |
| commit | 558dcdd6eefd334cd81fcf0c4a3843097974f652 (patch) | |
| tree | c85cee7179b3e721954a231178fe78f68b4c50ed /qpid/cpp/src/tests | |
| parent | 2be65f56d7b82430679e068756cc3d10b0855d47 (diff) | |
| download | qpid-python-558dcdd6eefd334cd81fcf0c4a3843097974f652.tar.gz | |
qpid::SessionState: Added error checking for invalid frame sequences.
client: Fix client crash on error during connection shutdown.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@659538 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rw-r--r-- | qpid/cpp/src/tests/ClientSessionTest.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/SessionState.cpp | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/ClientSessionTest.cpp b/qpid/cpp/src/tests/ClientSessionTest.cpp index aeff35dbf0..801e33d412 100644 --- a/qpid/cpp/src/tests/ClientSessionTest.cpp +++ b/qpid/cpp/src/tests/ClientSessionTest.cpp @@ -157,7 +157,7 @@ QPID_AUTO_TEST_CASE(testDispatcherThread) fix.session.messageTransfer(content=TransferContent(lexical_cast<string>(i), "my-queue")); } t.join(); - BOOST_CHECK_EQUAL(count, listener.messages.size()); + BOOST_REQUIRE_EQUAL(count, listener.messages.size()); for (size_t i = 0; i < count; ++i) BOOST_CHECK_EQUAL(lexical_cast<string>(i), listener.messages[i].getData()); } diff --git a/qpid/cpp/src/tests/SessionState.cpp b/qpid/cpp/src/tests/SessionState.cpp index 4beef87cfe..40922b3be8 100644 --- a/qpid/cpp/src/tests/SessionState.cpp +++ b/qpid/cpp/src/tests/SessionState.cpp @@ -65,17 +65,18 @@ string str(const boost::iterator_range<vector<AMQFrame>::const_iterator>& frames // Make a transfer command frame. AMQFrame transferFrame(bool hasContent) { AMQFrame t(in_place<MessageTransferBody>()); - t.setFirstFrame(); - t.setLastFrame(); - t.setFirstSegment(); + t.setFirstFrame(true); + t.setLastFrame(true); + t.setFirstSegment(true); t.setLastSegment(!hasContent); return t; } // Make a content frame AMQFrame contentFrame(string content, bool isLast=true) { AMQFrame f(in_place<AMQContentBody>(content)); - f.setFirstFrame(); - f.setLastFrame(); + f.setFirstFrame(true); + f.setLastFrame(true); + f.setFirstSegment(false); f.setLastSegment(isLast); return f; } |
