diff options
author | Alan Conway <aconway@apache.org> | 2008-02-20 15:26:05 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-02-20 15:26:05 +0000 |
commit | b9c71c852e2e7bbc1635ff62fabf2469e2175399 (patch) | |
tree | ee3ce9dcd6dc45e76270f6f4d696eb09bfc63895 /cpp/src/tests | |
parent | 615beb132f725ebc4a88d58dc5f3b8af8419f932 (diff) | |
download | qpid-python-b9c71c852e2e7bbc1635ff62fabf2469e2175399.tar.gz |
Added non-optional enum { SYNC, ASYNC } parameter to newSession.
Updated API doc in client/SessionBase.h
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@629503 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r-- | cpp/src/tests/BrokerFixture.h | 4 | ||||
-rw-r--r-- | cpp/src/tests/ClientSessionTest.cpp | 14 | ||||
-rw-r--r-- | cpp/src/tests/client_test.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/cluster_client.cpp | 4 | ||||
-rw-r--r-- | cpp/src/tests/latencytest.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/perftest.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/topic_listener.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/topic_publisher.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/txtest.cpp | 2 |
9 files changed, 17 insertions, 17 deletions
diff --git a/cpp/src/tests/BrokerFixture.h b/cpp/src/tests/BrokerFixture.h index b4e4a2082b..9fcdb57a99 100644 --- a/cpp/src/tests/BrokerFixture.h +++ b/cpp/src/tests/BrokerFixture.h @@ -91,8 +91,8 @@ struct SessionFixtureT : BrokerFixture { qpid::client::LocalQueue lq; SessionFixtureT() : connection(broker->getPort()), - session(connection.newSession()), - subs(session) + session(connection.newSession(qpid::client::ASYNC)), + subs(session) {} ~SessionFixtureT() { diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp index 87a4f59999..c299837f86 100644 --- a/cpp/src/tests/ClientSessionTest.cpp +++ b/cpp/src/tests/ClientSessionTest.cpp @@ -103,7 +103,7 @@ struct ClientSessionFixture : public ProxySessionFixture }; BOOST_FIXTURE_TEST_CASE(testQueueQuery, ClientSessionFixture) { - session =connection.newSession(); + session =connection.newSession(ASYNC); session.queueDeclare(queue="my-queue", alternateExchange="amq.fanout", exclusive=true, autoDelete=true); TypedResult<QueueQueryResult> result = session.queueQuery(string("my-queue")); BOOST_CHECK_EQUAL(false, result.get().getDurable()); @@ -114,7 +114,7 @@ BOOST_FIXTURE_TEST_CASE(testQueueQuery, ClientSessionFixture) { BOOST_FIXTURE_TEST_CASE(testTransfer, ClientSessionFixture) { - session=connection.newSession(); + session=connection.newSession(ASYNC); declareSubscribe(); session.messageTransfer(content=TransferContent("my-message", "my-queue")); //get & test the message: @@ -127,7 +127,7 @@ BOOST_FIXTURE_TEST_CASE(testTransfer, ClientSessionFixture) BOOST_FIXTURE_TEST_CASE(testDispatcher, ClientSessionFixture) { - session =connection.newSession(); + session =connection.newSession(ASYNC); declareSubscribe(); size_t count = 100; for (size_t i = 0; i < count; ++i) @@ -142,7 +142,7 @@ BOOST_FIXTURE_TEST_CASE(testDispatcher, ClientSessionFixture) /* FIXME aconway 2008-01-28: hangs BOOST_FIXTURE_TEST_CASE(testDispatcherThread, ClientSessionFixture) { - session =connection.newSession(); + session =connection.newSession(ASYNC); declareSubscribe(); size_t count = 10000; DummyListener listener(session, "my-dest", count); @@ -160,7 +160,7 @@ BOOST_FIXTURE_TEST_CASE(testDispatcherThread, ClientSessionFixture) BOOST_FIXTURE_TEST_CASE(_FIXTURE, ClientSessionFixture) { - session =connection.newSession(0); + session =connection.newSession(ASYNC, 0); session.suspend(); // session has 0 timeout. try { connection.resume(session); @@ -170,7 +170,7 @@ BOOST_FIXTURE_TEST_CASE(_FIXTURE, ClientSessionFixture) BOOST_FIXTURE_TEST_CASE(testUseSuspendedError, ClientSessionFixture) { - session =connection.newSession(60); + session =connection.newSession(ASYNC, 60); session.suspend(); try { session.exchangeQuery(name="amq.fanout"); @@ -180,7 +180,7 @@ BOOST_FIXTURE_TEST_CASE(testUseSuspendedError, ClientSessionFixture) BOOST_FIXTURE_TEST_CASE(testSuspendResume, ClientSessionFixture) { - session =connection.newSession(60); + session =connection.newSession(ASYNC, 60); declareSubscribe(); session.suspend(); // Make sure we are still subscribed after resume. diff --git a/cpp/src/tests/client_test.cpp b/cpp/src/tests/client_test.cpp index eb145272ca..84fc9434de 100644 --- a/cpp/src/tests/client_test.cpp +++ b/cpp/src/tests/client_test.cpp @@ -92,7 +92,7 @@ int main(int argc, char** argv) //Create and open a session on the connection through which //most functionality is exposed: - Session_0_10 session = connection.newSession(); + Session_0_10 session = connection.newSession(ASYNC); if (opts.trace) std::cout << "Opened session." << std::endl; diff --git a/cpp/src/tests/cluster_client.cpp b/cpp/src/tests/cluster_client.cpp index 30b7e38801..cd048d1651 100644 --- a/cpp/src/tests/cluster_client.cpp +++ b/cpp/src/tests/cluster_client.cpp @@ -62,14 +62,14 @@ BOOST_AUTO_TEST_CASE(testWiringReplication) { ClusterConnections cluster; BOOST_REQUIRE(cluster.size() > 1); - Session broker0 = cluster[0]->newSession(); + Session broker0 = cluster[0]->newSession(ASYNC); broker0.exchangeDeclare(exchange="ex"); broker0.queueDeclare(queue="q"); broker0.queueBind(exchange="ex", queue="q", routingKey="key"); broker0.close(); for (size_t i = 1; i < cluster.size(); ++i) { - Session s = cluster[i]->newSession(); + Session s = cluster[i]->newSession(ASYNC); s.messageTransfer(content=TransferContent("data", "key", "ex")); s.messageSubscribe(queue="q", destination="q"); s.messageFlow(destination="q", unit=0, value=1);//messages diff --git a/cpp/src/tests/latencytest.cpp b/cpp/src/tests/latencytest.cpp index ddafe0f49b..86200054d8 100644 --- a/cpp/src/tests/latencytest.cpp +++ b/cpp/src/tests/latencytest.cpp @@ -156,7 +156,7 @@ public: Client::Client(const string& q) : queue(q) { opts.open(connection); - session = connection.newSession(); + session = connection.newSession(ASYNC); } void Client::start() diff --git a/cpp/src/tests/perftest.cpp b/cpp/src/tests/perftest.cpp index e67acd4465..bc638635da 100644 --- a/cpp/src/tests/perftest.cpp +++ b/cpp/src/tests/perftest.cpp @@ -196,7 +196,7 @@ struct Client : public Runnable { Client() { opts.open(connection); - session = connection.newSession(); + session = connection.newSession(ASYNC); } ~Client() { diff --git a/cpp/src/tests/topic_listener.cpp b/cpp/src/tests/topic_listener.cpp index c78bc4d73b..ec73f3cbe0 100644 --- a/cpp/src/tests/topic_listener.cpp +++ b/cpp/src/tests/topic_listener.cpp @@ -101,7 +101,7 @@ int main(int argc, char** argv){ else { Connection connection(args.trace); args.open(connection); - Session_0_10 session = connection.newSession(); + Session_0_10 session = connection.newSession(ASYNC); if (args.transactional) { session.txSelect(); } diff --git a/cpp/src/tests/topic_publisher.cpp b/cpp/src/tests/topic_publisher.cpp index 80c9bf6607..24a4fc6752 100644 --- a/cpp/src/tests/topic_publisher.cpp +++ b/cpp/src/tests/topic_publisher.cpp @@ -107,7 +107,7 @@ int main(int argc, char** argv) { else { Connection connection(args.trace); args.open(connection); - Session_0_10 session = connection.newSession(); + Session_0_10 session = connection.newSession(ASYNC); if (args.transactional) { session.txSelect(); } diff --git a/cpp/src/tests/txtest.cpp b/cpp/src/tests/txtest.cpp index 4373a9c1e7..f7776dee8d 100644 --- a/cpp/src/tests/txtest.cpp +++ b/cpp/src/tests/txtest.cpp @@ -101,7 +101,7 @@ struct Client Client() { opts.open(connection); - session = connection.newSession(); + session = connection.newSession(ASYNC); } ~Client() |