diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2007-07-17 20:46:45 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2007-07-17 20:46:45 +0000 |
commit | 1d1f5c021b620f01c6bcb5fbded0eb1b50e445ab (patch) | |
tree | 1c3f2c94806c73b1c6a93c4350ebf2f23b26c981 /cpp/src/tests/QueueTest.cpp | |
parent | 55b232f3d2448dab91c926ba171cc5fd9b5a04c5 (diff) | |
download | qpid-python-1d1f5c021b620f01c6bcb5fbded0eb1b50e445ab.tar.gz |
Updated queue class, can run dispatch on seperate thread or on
thread servicing the request. current set to use a worker - better
test results.
controlled by setting serilizable true - no worker, false, use a worker
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@557052 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/QueueTest.cpp')
-rw-r--r-- | cpp/src/tests/QueueTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/tests/QueueTest.cpp b/cpp/src/tests/QueueTest.cpp index 7d6f5f4672..7648011b2a 100644 --- a/cpp/src/tests/QueueTest.cpp +++ b/cpp/src/tests/QueueTest.cpp @@ -84,12 +84,16 @@ class QueueTest : public CppUnit::TestCase Message::shared_ptr msg3 = message("e", "C"); queue->deliver(msg1); - CPPUNIT_ASSERT_EQUAL(msg1.get(), c1.last.get()); + /** if dispatched on diff thread, force dispatch so don't have to wait for thread. Only do in text */ + queue->dispatch(); + CPPUNIT_ASSERT_EQUAL(msg1.get(), c1.last.get()); queue->deliver(msg2); + queue->dispatch(); CPPUNIT_ASSERT_EQUAL(msg2.get(), c2.last.get()); queue->deliver(msg3); + queue->dispatch(); CPPUNIT_ASSERT_EQUAL(msg3.get(), c1.last.get()); //Test cancellation: |