From 1536ce288de7228869278baf795ff869aa255c85 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 19 Jan 2010 16:13:06 +0000 Subject: Fix intermittent test error: cluster_test.cpp(1108): error in "testRelease": check browse(c3, "q", 5) == expected failed [ != m_1 m_2 m_3 m_4 m_5 ] This was a test issue, not a broker issue. What seems to have been happening: - start broker b0 & send messages. - fork broker b1 - line 1103 (lqSub.release(...)); executes against b0 _before_ b1 connects for update lqSub.release(lqSub.getUnaccepted()); - line 1108 browse() executes during the update. - update takes > 0.5 secs for some reason, browse times out. The fix is a synchronous flush in browse() which will wait for the broker to be responsive before trying to get the messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@900829 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/cluster_test.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cpp/src/tests/cluster_test.cpp') diff --git a/cpp/src/tests/cluster_test.cpp b/cpp/src/tests/cluster_test.cpp index 33f23aa5b3..bb1c014b99 100644 --- a/cpp/src/tests/cluster_test.cpp +++ b/cpp/src/tests/cluster_test.cpp @@ -157,6 +157,7 @@ vector browse(Client& c, const string& q, int n) { ); LocalQueue lq; c.subs.subscribe(lq, q, browseSettings); + c.session.messageFlush(q); vector result; for (int i = 0; i < n; ++i) { Message m; -- cgit v1.2.1