diff options
author | Gordon Sim <gsim@apache.org> | 2009-01-21 14:22:55 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-01-21 14:22:55 +0000 |
commit | e250b40883674b0cced43bcdece5f7fde3dabae1 (patch) | |
tree | eb21aaafdfe3349cb67411a3f7295e7a8c566eac | |
parent | 19c49dee096d829c2e5cc38f42c358130a772e63 (diff) | |
download | qpid-python-e250b40883674b0cced43bcdece5f7fde3dabae1.tar.gz |
Fix for race condition in test identified by Ted.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@736317 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/tests/QueueEvents.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qpid/cpp/src/tests/QueueEvents.cpp b/qpid/cpp/src/tests/QueueEvents.cpp index f6b76b69ba..3e377d04b3 100644 --- a/qpid/cpp/src/tests/QueueEvents.cpp +++ b/qpid/cpp/src/tests/QueueEvents.cpp @@ -79,14 +79,15 @@ QPID_AUTO_TEST_CASE(testBasicEventProcessing) QueuedMessage event1(&queue, MessageUtils::createMessage(), id); QueuedMessage event2(&queue, MessageUtils::createMessage(), ++id); - events.enqueued(event1); - events.enqueued(event2); - events.dequeued(event1); //define events expected by listener: listener.expect(QueueEvents::Event(QueueEvents::ENQUEUE, event1)); listener.expect(QueueEvents::Event(QueueEvents::ENQUEUE, event2)); listener.expect(QueueEvents::Event(QueueEvents::DEQUEUE, event1)); + events.enqueued(event1); + events.enqueued(event2); + events.dequeued(event1); + dispatchThread.join(); events.shutdown(); events.unregisterListener("dummy"); |