diff options
author | Alan Conway <aconway@apache.org> | 2009-11-20 15:11:01 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-11-20 15:11:01 +0000 |
commit | 7fef9fea2af68d01f6c18a1d6a3612073da0e67b (patch) | |
tree | 47914cba701ec586a69ca3aa5177cd3b1d736786 /cpp/src/tests/cluster_test.cpp | |
parent | 994c4200e0efd51af5717fb27ea025222832482a (diff) | |
download | qpid-python-7fef9fea2af68d01f6c18a1d6a3612073da0e67b.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/qpid@882598 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster_test.cpp')
-rw-r--r-- | cpp/src/tests/cluster_test.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/cpp/src/tests/cluster_test.cpp b/cpp/src/tests/cluster_test.cpp index c2683727cf..7ca58415dc 100644 --- a/cpp/src/tests/cluster_test.cpp +++ b/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")); |