diff options
author | Gordon Sim <gsim@apache.org> | 2009-02-27 18:11:47 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-02-27 18:11:47 +0000 |
commit | 067a67c5c422c9bec63210ccf58f30241b521cea (patch) | |
tree | 64f783170386095c005a65dcd54d5d980b1c6528 /cpp/src/tests/resuming_receiver.cpp | |
parent | bdf674be05b7a205ad3802e14df4d686746d657b (diff) | |
download | qpid-python-067a67c5c422c9bec63210ccf58f30241b521cea.tar.gz |
Fix test to account for failure after last message has been delivered, but before the session and connection are closed.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@748624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/resuming_receiver.cpp')
-rw-r--r-- | cpp/src/tests/resuming_receiver.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpp/src/tests/resuming_receiver.cpp b/cpp/src/tests/resuming_receiver.cpp index f49a115e1e..da7c5f32ff 100644 --- a/cpp/src/tests/resuming_receiver.cpp +++ b/cpp/src/tests/resuming_receiver.cpp @@ -53,6 +53,7 @@ class Listener : public MessageListener, bool gaps; uint reportFrequency; int verbosity; + bool done; }; @@ -62,7 +63,8 @@ Listener::Listener(int freq, int verbosity) lastSn(0), gaps(false), reportFrequency(freq), - verbosity(verbosity) + verbosity(verbosity), + done(false) {} @@ -116,9 +118,11 @@ void Listener::execute(AsyncSession& session, bool isRetry) if (isRetry) { // std::cout << "Resuming from " << count << std::endl; } - SubscriptionManager subs(session); - subscription = subs.subscribe(*this, "message_queue"); - subs.run(); + if (!done) { + SubscriptionManager subs(session); + subscription = subs.subscribe(*this, "message_queue"); + subs.run(); + } } void Listener::editUrlList(std::vector<Url>& urls) |