From 1d1f5c021b620f01c6bcb5fbded0eb1b50e445ab Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Tue, 17 Jul 2007 20:46:45 +0000 Subject: 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 --- cpp/src/tests/QueueTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpp/src/tests/QueueTest.cpp') 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: -- cgit v1.2.1