diff options
| author | Gordon Sim <gsim@apache.org> | 2007-05-15 07:38:48 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-05-15 07:38:48 +0000 |
| commit | b20c9a463aa86f91e5c3f5d86c75c988591f8d74 (patch) | |
| tree | 3bfa8e4badada05d663033c2289ad3df89d0654c /cpp/tests/BasicP2PTest.h | |
| parent | ad0c6952f75c86ad587602cfb14dab46efedd4f6 (diff) | |
| download | qpid-python-b20c9a463aa86f91e5c3f5d86c75c988591f8d74.tar.gz | |
Separated out implementation from interop test headers.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@538079 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/tests/BasicP2PTest.h')
| -rw-r--r-- | cpp/tests/BasicP2PTest.h | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/cpp/tests/BasicP2PTest.h b/cpp/tests/BasicP2PTest.h index 8b5d0e7a8c..3936f556a9 100644 --- a/cpp/tests/BasicP2PTest.h +++ b/cpp/tests/BasicP2PTest.h @@ -34,51 +34,11 @@ namespace qpid { -using namespace qpid::client; - class BasicP2PTest : public SimpleTestCaseBase { - - class Receiver : public Worker, public MessageListener - { - const std::string queue; - std::string tag; - public: - Receiver(TestOptions& options, const std::string& _queue, const int _messages) : Worker(options, _messages), queue(_queue){} - - void init() - { - Queue q(queue, true); - channel.declareQueue(q); - framing::FieldTable args; - channel.bind(Exchange::STANDARD_DIRECT_EXCHANGE, q, queue, args); - channel.consume(q, tag, this); - channel.start(); - } - - void start(){ - } - - void received(Message&) - { - count++; - } - }; - + class Receiver; public: - void assign(const std::string& role, framing::FieldTable& params, TestOptions& options) - { - std::string queue = params.getString("P2P_QUEUE_AND_KEY_NAME"); - int messages = params.getInt("P2P_NUM_MESSAGES"); - if (role == "SENDER") { - worker = std::auto_ptr<Worker>(new Sender(options, Exchange::STANDARD_DIRECT_EXCHANGE, queue, messages)); - } else if(role == "RECEIVER"){ - worker = std::auto_ptr<Worker>(new Receiver(options, queue, messages)); - } else { - throw Exception("unrecognised role"); - } - worker->init(); - } + void assign(const std::string& role, framing::FieldTable& params, TestOptions& options); }; } |
