summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2009-02-27 18:11:47 +0000
committerGordon Sim <gsim@apache.org>2009-02-27 18:11:47 +0000
commit931f118bd0ea64cd6502e612298c99a2331b7eb3 (patch)
tree58c80fa5b36c8bdcbf69647c8c275ac87bf1a323 /qpid/cpp/src
parent503e97930b838c7db113c04d697449268dc1e394 (diff)
downloadqpid-python-931f118bd0ea64cd6502e612298c99a2331b7eb3.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@748624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/tests/resuming_receiver.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/resuming_receiver.cpp b/qpid/cpp/src/tests/resuming_receiver.cpp
index f49a115e1e..da7c5f32ff 100644
--- a/qpid/cpp/src/tests/resuming_receiver.cpp
+++ b/qpid/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)