diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2007-07-18 18:03:54 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2007-07-18 18:03:54 +0000 |
commit | a51da643a383c5c55fcd33861e379607037983f2 (patch) | |
tree | a25e13e341ab4bbef2e5212919f5b6c6c60f9594 /cpp/src/tests/BrokerChannelTest.cpp | |
parent | 51a364d23a5982a4a17417206de50e16f679d1ca (diff) | |
download | qpid-python-a51da643a383c5c55fcd33861e379607037983f2.tar.gz |
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
Diffstat (limited to 'cpp/src/tests/BrokerChannelTest.cpp')
-rw-r--r-- | cpp/src/tests/BrokerChannelTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |