From a51da643a383c5c55fcd33861e379607037983f2 Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Wed, 18 Jul 2007 18:03:54 +0000 Subject: Fixed MT safety issues pointed out by Gordon. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@557343 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/BrokerChannelTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cpp/src/tests/BrokerChannelTest.cpp') diff --git a/cpp/src/tests/BrokerChannelTest.cpp b/cpp/src/tests/BrokerChannelTest.cpp index 251ac624ab..acbe867cfa 100644 --- a/cpp/src/tests/BrokerChannelTest.cpp +++ b/cpp/src/tests/BrokerChannelTest.cpp @@ -212,6 +212,7 @@ class BrokerChannelTest : public CppUnit::TestCase string tag("test"); channel.consume(recorder.createAdapter(), tag, queue, false, false, 0); queue->deliver(msg); + sleep(2); CPPUNIT_ASSERT_EQUAL((size_t) 1, recorder.delivered.size()); CPPUNIT_ASSERT_EQUAL(msg, recorder.delivered.front().first); @@ -293,6 +294,7 @@ class BrokerChannelTest : public CppUnit::TestCase queue->deliver(msg1); queue->deliver(msg2); queue->deliver(msg3); + sleep(2); Message::shared_ptr next = queue->dequeue(); CPPUNIT_ASSERT_EQUAL(msg1, next); @@ -336,6 +338,7 @@ class BrokerChannelTest : public CppUnit::TestCase CPPUNIT_ASSERT_EQUAL((size_t) 0, recorder.delivered.size()); channel.flow(true); + sleep(2); //ensure no messages have been delivered CPPUNIT_ASSERT_EQUAL((size_t) 1, recorder.delivered.size()); CPPUNIT_ASSERT_EQUAL(msg, recorder.delivered.front().first); -- cgit v1.2.1