diff options
author | Alan Conway <aconway@apache.org> | 2007-12-10 17:57:49 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-12-10 17:57:49 +0000 |
commit | 22ef0be441cd0f12b1ca6402f397deac390ce4d0 (patch) | |
tree | c124a8348ad9f0517116e2c638884c6e0adb50d1 /cpp/src/tests/ClientSessionTest.cpp | |
parent | e997eeb68fdb7f975f9e70848832f2b0d7612683 (diff) | |
download | qpid-python-22ef0be441cd0f12b1ca6402f397deac390ce4d0.tar.gz |
src/tests/SocketProxy.h: proxy between local client & server to simulate network disconnect.
src/qpid/client/Connector.h: remove friend hack for previous flawed disconnect approach.
src/tests/BrokerFixture.h: ""
src/tests/ClientSessionTest.cpp, exception_test.cpp: use ProxyConnection
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@602980 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/ClientSessionTest.cpp')
-rw-r--r-- | cpp/src/tests/ClientSessionTest.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp index 70e8a41074..a960cea230 100644 --- a/cpp/src/tests/ClientSessionTest.cpp +++ b/cpp/src/tests/ClientSessionTest.cpp @@ -20,6 +20,7 @@ */ #include "qpid_test_plugin.h" #include "BrokerFixture.h" +#include "SocketProxy.h" #include "qpid/client/Dispatcher.h" #include "qpid/client/Session_0_10.h" #include "qpid/framing/TransferContent.h" @@ -181,14 +182,15 @@ class ClientSessionTest : public CppUnit::TestCase, public BrokerFixture } void testDisconnectResume() { - session =connection.newSession(60); - session.queueDeclare(queue="before"); + ProxyConnection c(broker->getPort()); + Session_0_10 s = c.session; + s.queueDeclare(queue="before"); CPPUNIT_ASSERT(queueExists("before")); - session.queueDeclare(queue=string("after")); - disconnect(connection); + s.queueDeclare(queue=string("after")); + c.proxy.client.close(); // Disconnect the client. Connection c2; open(c2); - c2.resume(session); + c2.resume(s); CPPUNIT_ASSERT(queueExists("after")); c2.close(); } |