summaryrefslogtreecommitdiff
path: root/cpp/src/tests/IncompleteMessageList.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-11-27 18:48:18 +0000
committerGordon Sim <gsim@apache.org>2008-11-27 18:48:18 +0000
commit83a3e07591edb15d5301dfc8da3e4f90b440d8eb (patch)
tree956f913478c63649f36246bc317f274653904280 /cpp/src/tests/IncompleteMessageList.cpp
parent8c0a54230037ed99d5495fa13f68017cfc05473d (diff)
downloadqpid-python-83a3e07591edb15d5301dfc8da3e4f90b440d8eb.tar.gz
Backed out last change; not sure it actually makes sense.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@721258 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/IncompleteMessageList.cpp')
-rw-r--r--cpp/src/tests/IncompleteMessageList.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/cpp/src/tests/IncompleteMessageList.cpp b/cpp/src/tests/IncompleteMessageList.cpp
index d9ea70f815..925cdbf43e 100644
--- a/cpp/src/tests/IncompleteMessageList.cpp
+++ b/cpp/src/tests/IncompleteMessageList.cpp
@@ -24,8 +24,6 @@
#include "qpid/broker/NullMessageStore.h"
#include "qpid/broker/Queue.h"
#include "qpid/broker/IncompleteMessageList.h"
-#include "qpid/sys/Runnable.h"
-#include "qpid/sys/Thread.h"
#include "unit_test.h"
@@ -95,6 +93,7 @@ QPID_AUTO_TEST_CASE(testProcessWithIncomplete)
list.process(Checker(3, 5), false);
}
+
struct MockStore : public NullMessageStore
{
Queue::shared_ptr queue;
@@ -126,38 +125,4 @@ QPID_AUTO_TEST_CASE(testSyncProcessWithIncomplete)
list.process(Checker(1, 5), true);
}
-struct AsyncProcessor : qpid::sys::Runnable
-{
- Checker checker;
- IncompleteMessageList& list;
-
- AsyncProcessor(uint start, uint end, IncompleteMessageList& list_) : checker(start, end), list(list_) {}
-
- void run()
- {
- list.process(checker, true);
- }
-};
-
-QPID_AUTO_TEST_CASE(testSyncProcessInterruptedOnClose)
-{
- IncompleteMessageList list;
- SequenceNumber counter(1);
- NullMessageStore store;
- Queue::shared_ptr queue(new Queue("mock-queue"));
- //fill up list with messages
- for (int i = 0; i < 5; i++) {
- boost::intrusive_ptr<Message> msg(new Message(counter++));
- list.add(msg);
- if (i == 2) {
- //mark a message in the middle as incomplete
- msg->enqueueAsync(queue, &store);
- }
- }
- AsyncProcessor ap(1, 2, list);
- qpid::sys::Thread thread(ap);
- list.close();
- thread.join();
-}
-
QPID_AUTO_TEST_SUITE_END()