summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-11-20 15:11:01 +0000
committerAlan Conway <aconway@apache.org>2009-11-20 15:11:01 +0000
commit615d92bfcc4c7a80317229146653c8f762a2e123 (patch)
tree7842c81a34bbaa494345495aee465214cbac197c /qpid/cpp
parent5837efc7e40adc4c8bcb3b86bec877ffdc418f95 (diff)
downloadqpid-python-615d92bfcc4c7a80317229146653c8f762a2e123.tar.gz
Changes to hopefully address a sporadic test failure. Couldn't reproduce so not sure.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@882598 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/tests/cluster_test.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/cluster_test.cpp b/qpid/cpp/src/tests/cluster_test.cpp
index c2683727cf..7ca58415dc 100644
--- a/qpid/cpp/src/tests/cluster_test.cpp
+++ b/qpid/cpp/src/tests/cluster_test.cpp
@@ -87,7 +87,7 @@ ClusterFixture::Args prepareArgs(const bool durableFlag = false) {
}
// Timeout for tests that wait for messages
-const sys::Duration TIMEOUT=sys::TIME_SEC/4;
+const sys::Duration TIMEOUT=sys::TIME_SEC/2;
ostream& operator<<(ostream& o, const cpg_name* n) {
@@ -150,7 +150,7 @@ Message makeMessage(const string& data, const string& key, bool durable = false)
vector<string> browse(Client& c, const string& q, int n) {
SubscriptionSettings browseSettings(
- FlowControl::unlimited(),
+ FlowControl::messageCredit(n),
ACCEPT_MODE_NONE,
ACQUIRE_MODE_NOT_ACQUIRED,
0 // No auto-ack.
@@ -262,9 +262,6 @@ QPID_AUTO_TEST_CASE(testAcl) {
}
QPID_AUTO_TEST_CASE(testMessageTimeToLive) {
- // Note: this doesn't actually test for cluster race conditions around TTL,
- // it just verifies that basic TTL functionality works.
- //
ClusterFixture::Args args;
prepareArgs(args, durableFlag);
ClusterFixture cluster(2, args, -1);
@@ -279,9 +276,9 @@ QPID_AUTO_TEST_CASE(testMessageTimeToLive) {
cluster.add();
Client c2(cluster[1], "c2");
- BOOST_CHECK_EQUAL(browse(c0, "p", 2), list_of<string>("x")("y"));
- BOOST_CHECK_EQUAL(browse(c1, "p", 2), list_of<string>("x")("y"));
- BOOST_CHECK_EQUAL(browse(c2, "p", 2), list_of<string>("x")("y"));
+ BOOST_CHECK_EQUAL(browse(c0, "p", 1), list_of<string>("x"));
+ BOOST_CHECK_EQUAL(browse(c1, "p", 1), list_of<string>("x"));
+ BOOST_CHECK_EQUAL(browse(c2, "p", 1), list_of<string>("x"));
sys::usleep(200*1000);
BOOST_CHECK_EQUAL(browse(c0, "q", 1), list_of<string>("b"));