diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2012-05-04 15:39:19 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2012-05-04 15:39:19 +0000 |
| commit | 633c33f224f3196f3f9bd80bd2e418d8143fea06 (patch) | |
| tree | 1391da89470593209466df68c0b40b89c14963b1 /cpp/src/tests/qpid-ping.cpp | |
| parent | c73f9286ebff93a6c8dbc29cf05e258c4b55c976 (diff) | |
| download | qpid-python-633c33f224f3196f3f9bd80bd2e418d8143fea06.tar.gz | |
QPID-3858: Updated branch - merged from trunk r.1333987
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1334037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/qpid-ping.cpp')
| -rw-r--r-- | cpp/src/tests/qpid-ping.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/cpp/src/tests/qpid-ping.cpp b/cpp/src/tests/qpid-ping.cpp index 0cb4afa0ee..52331499e7 100644 --- a/cpp/src/tests/qpid-ping.cpp +++ b/cpp/src/tests/qpid-ping.cpp @@ -32,11 +32,20 @@ #include <string> #include <iostream> -using namespace std; -using namespace qpid::sys; -using namespace qpid::framing; -using namespace qpid::client; -using namespace qpid; +using std::cerr; +using std::cout; +using std::endl; +using std::exception; +using std::string; +using namespace qpid::client::arg; // For keyword args +using qpid::client::AsyncSession; +using qpid::client::Connection; +using qpid::client::Message; +using qpid::client::SubscriptionManager; +using qpid::framing::Uuid; + +namespace qpid { +namespace tests { struct PingOptions : public qpid::TestOptions { int timeout; // Timeout in seconds. @@ -48,9 +57,11 @@ struct PingOptions : public qpid::TestOptions { } }; +}} // namespace qpid::tests + int main(int argc, char** argv) { try { - PingOptions opts; + qpid::tests::PingOptions opts; opts.parse(argc, argv); opts.con.heartbeat = (opts.timeout+1)/2; Connection connection; @@ -58,8 +69,8 @@ int main(int argc, char** argv) { if (!opts.quiet) cout << "Opened connection." << endl; AsyncSession s = connection.newSession(); string qname(Uuid(true).str()); - s.queueDeclare(arg::queue=qname,arg::autoDelete=true,arg::exclusive=true); - s.messageTransfer(arg::content=Message("hello", qname)); + s.queueDeclare(queue=qname, autoDelete=true, exclusive=true); + s.messageTransfer(content=Message("hello", qname)); if (!opts.quiet) cout << "Sent message." << endl; SubscriptionManager subs(s); subs.get(qname); |
