qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r882598 - /qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp
Date Fri, 20 Nov 2009 15:11:01 GMT
Author: aconway
Date: Fri Nov 20 15:11:01 2009
New Revision: 882598

URL: http://svn.apache.org/viewvc?rev=882598&view=rev
Log:
Changes to hopefully address a sporadic test failure. Couldn't reproduce so not sure.

Modified:
    qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp?rev=882598&r1=882597&r2=882598&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp Fri Nov 20 15:11:01 2009
@@ -87,7 +87,7 @@
 }
 
 // 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 @@
 
 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(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 @@
     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"));



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message