summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ClientSessionTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* src/tests/ClientSessionTest.cpp: uncommented tests for session resume as ↵Alan Conway2008-04-231-12/+11
| | | | | | | | | EXPECTED_FAILURES tests. src/tests/unit_test.h: workarounds for broken EXPECTED_FAILURES tests in boost <= 1.34 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@650997 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: send message-accept for acks (as well as completion)Gordon Sim2008-04-211-1/+3
| | | | | | | | * AckPolicy now maintains a set of transfered messages for cumulative accepts git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@650159 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: converted c++ client to use final 0-10 protocolGordon Sim2008-04-201-3/+5
| | | | | | | | | | * connection handler converted to using invoker & proxy and updated to final method defs * SessionCore & ExecutionHandler replace by SessionImpl * simplified handling of completion & results, removed handling of responses git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@649915 13f79535-47bb-0310-9956-ffa450edef68
* Patch for improved compatibility with gcc 3.4 and boost 1.33Andrew Stitcher2008-04-171-31/+37
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@649294 13f79535-47bb-0310-9956-ffa450edef68
* Start moving towards final 0-10 spec:Gordon Sim2008-02-211-2/+2
| | | | | | | | | | | | | * marked preview spec as 99-0 to distinguish it from 0-10 (which will now be used for the final version) * modified python client to treat 99-0 as 0-10 for now * modified broker to have two paths for the two different versions: 99-0 uses PreviewConnection, PreviewConnectionHandler and PreviewSessionHandler which are straight copy & pastes of the Connection, ConnectionHandler and SessionHandler now associated with 0-10 (so we can migrate the 0-10 path to the final spec without affecting clients working with the preview version) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@629883 13f79535-47bb-0310-9956-ffa450edef68
* Added non-optional enum { SYNC, ASYNC } parameter to newSession.Alan Conway2008-02-201-7/+7
| | | | | | | Updated API doc in client/SessionBase.h git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@629503 13f79535-47bb-0310-9956-ffa450edef68
* Added a test (currently disabled) that highlights a deadlock in the client ↵Gordon Sim2008-02-111-8/+40
| | | | | | when commands are sent to the broker concurrently with acks (e.g. when the dispatcher thread is running with auto-acking and messages are sent on another thread). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@620481 13f79535-47bb-0310-9956-ffa450edef68
* Added testSendToSelf for https://bugzilla.redhat.com/show_bug.cgi?id=410551Alan Conway2008-02-051-0/+17
| | | | | | | | | | | | | | | | | | | | M src/tests/ClientSessionTest.cpp Disabled management for BrokerFixture - management singleton assumes only one broker per process, causes shutdown races with fixtures. M src/tests/BrokerFixture.h Made Timer::stop() idempotent M src/qpid/broker/Timer.cpp M src/qpid/broker/Timer.h Added STL-style size() and empty() M src/qpid/sys/BlockingQueue.h M src/qpid/client/LocalQueue.cpp M src/qpid/client/LocalQueue.h git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@618770 13f79535-47bb-0310-9956-ffa450edef68
* Added disabled test and FIXME note to fix client-side race.Alan Conway2008-01-281-18/+26
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@615968 13f79535-47bb-0310-9956-ffa450edef68
* Convert ClientSessionTest to boost.Alan Conway2008-01-281-106/+98
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@615958 13f79535-47bb-0310-9956-ffa450edef68
* Improved/additional client API tests.Alan Conway2008-01-241-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced InProcessBroker with a more accurate loopback BrokerFixture. - Added asserts for mutex/condition/thread errors in debug build. - Added client tests for several exception conditions. - Added peer address to log ouput, client/server distinguished by (addr) or [addr] - Fixed various deadlocks & races exposed by the new asserts & tests. File-by-file: New BrokerFixture replaces InProcessBroker D src/tests/InProcessBroker.h M src/tests/BrokerFixture.h M src/tests/SocketProxy.h M src/tests/Makefile.am Made it run a bit faster. M src/tests/quick_perftest Redundant D src/tests/APRBaseTest.cpp Updated tests to use BrokerFixture M src/tests/ClientChannelTest.cpp M src/tests/exception_test.cpp M src/tests/ClientSessionTest.cpp Print thread IDs in decimal, same as GDB. M src/qpid/log/Logger.cpp Assert mutex/condition ops in debug build. M src/qpid/sys/posix/check.h M src/qpid/sys/posix/Mutex.h M src/qpid/sys/posix/Condition.h M src/qpid/sys/posix/Thread.h Added toFd() so SocketProxy can use ::select() M src/qpid/sys/Socket.h M src/qpid/sys/posix/Socket.cpp Fixes for races & deadlocks shown up by new tests & asserts. Mostly shutdown/close issues. M src/qpid/client/ConnectionHandler.h M src/qpid/client/ConnectionImpl.cpp M src/qpid/client/Demux.h M src/qpid/client/SessionCore.cpp M src/qpid/client/ConnectionHandler.cpp M src/qpid/client/Connector.h M src/qpid/client/Demux.cpp M src/qpid/client/Dispatcher.cpp M src/qpid/client/ConnectionImpl.h Logging peer address. M src/qpid/sys/AsynchIOAcceptor.cpp git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@615063 13f79535-47bb-0310-9956-ffa450edef68
* src/tests/ClientSessionTest.cpp: Disabled hanging test: testDisconnectResume. Alan Conway2007-12-111-20/+12
| | | | | | | | src/tests/SocketProxy.h: fixed exception handling. src/tests/exception_test.cpp: fixed compile error. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@603273 13f79535-47bb-0310-9956-ffa450edef68
* src/tests/SocketProxy.h: proxy between local client & server to simulate ↵Alan Conway2007-12-101-5/+7
| | | | | | | | | | | 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@602980 13f79535-47bb-0310-9956-ffa450edef68
* Summary:Alan Conway2007-12-071-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced InProcessBroker with BrokerFixture, uses a full loopback broker for more realistic tests. - Extracted non-generated parts of Session_0_10 into SessionBase. - Sundry small fixes. src/tests/BrokerFixture.h - in process broker with loopback connections. - tests can force a disorderly disconnect. src/qpid/client/Connector.h - back door to private members for BrokerFixture. - close() in destructor to avoid leaks. src/qpid/client/ConnectionImpl.h,cpp: - close() in destructor, to fix hang when destroyed without being closed. src/qpid/client/CompletionTracker.h,.cpp: - Fixed race in close/add. src/qpid/client/SessionBase.h,cpp: - Extracted all non-generated code from Session_0_10 into SessionBase - Added sync() src/tests/exception_test.cpp: Converted to boost & BrokerFixture src/tests/ClientChannelTest.cpp, ClientSessionTest.cpp: Use BrokerFixture git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@602182 13f79535-47bb-0310-9956-ffa450edef68
* Disable recoding of frames for replay where replay will not be required.Gordon Sim2007-11-281-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@598992 13f79535-47bb-0310-9956-ffa450edef68
* Added framing::BodyHolder:Alan Conway2007-11-221-25/+1
| | | | | | | | | | | | | | - Uniform holder for all body types, replaces MethodHolder. - Uses in_place constructors to avoid avoid body copy. framing::AMQFrame: - Holds body in heap-allocated intrusive_ptr<BodyHolder> - Uses in_place constructors to avoid avoid body copy. Removed/downgraded to TODO many redundant FIXME comments. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@597513 13f79535-47bb-0310-9956-ffa450edef68
* client::SubscriptionManager:Alan Conway2007-11-071-1/+1
| | | | | | | | | | | | | | | | | - Added autoStop support. - Added LocalQueue subscriptions. - Expose AckPolicy settings to user. client::Message: - incoming Messages carry their session for acknowledge perftest: (see perftest --help for details...) - allow multiple consumers. - 3 queue modes: shared, fanout, topic. - set size of messages git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@592869 13f79535-47bb-0310-9956-ffa450edef68
* Client API: fix keyword parameter ambiguities for beta client API.Alan Conway2007-10-301-16/+17
| | | | | | | | | | | | | | Classes: - client::no_keyword::Session_0_10 - plain defaulted signatures - client::Session_0_10 - keyword API. Keyword API changes: - keywords in client::arg namespace, user says: s.bind(arg::queue="x"...) - user can omit with: using namespace client::arg; s.bind(queue="x"...) - No trailing "_" required on session functions. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@590498 13f79535-47bb-0310-9956-ffa450edef68
* Rename client::Session as client::Session_0_10Alan Conway2007-10-291-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@589794 13f79535-47bb-0310-9956-ffa450edef68
* Session resume support in client & broker: Client can resume a sessionAlan Conway2007-10-261-46/+105
| | | | | | | | | | | | | | | | | | | | | | | | | after voluntary suspend() or network failure. Frames lost in network failure are automatically re-transmitted for transparent re-connection. client::Session improvements: - Locking to avoid races between network & user threads. - Replaced client::StateManager with sys::StateMonitor - avoid heap allocation. qpid::Exception clean up: - use QPID_MSG consistently to format exception messages. - throw typed exceptions (in reply_exceptions.h) for AMQP exceptions. - re-throw correct typed exception on client for exceptions from broker. - Removed QpidError.h rubygen/templates/constants.rb: - constants.h: Added FOO_CLASS_ID and FOO_BAR_METHOD_ID constants. - reply_constants.h: Added throwReplyException(code, text) log::Logger: - Fixed shutdown race in Statement::~Initializer() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@588761 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/ClientSessionTest.cpp: Suspend/resume tests.Alan Conway2007-09-281-0/+24
| | | | | | | | | | | | | | | * broker/SessionManager.cpp, broker/SessionHandler.cpp: Implement suspend/resume * client/ScopedAssociation.h, SessionCore.h, SessionHandler.h: Simplified relationships. - Removed ScopedAssociation. - SessionHandler: is now a member of SessionCore. - SessionCore: shared_ptr ownership by Session(s) and ConnectionImpl. - Using framing::FrameHandler interfaces. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@580403 13f79535-47bb-0310-9956-ffa450edef68
* 2007-09-24 Alan Conway <aconway@redhat.com>Alan Conway2007-09-241-0/+3
| | | | | | | | | | | | | | | * cpp/src/qpid/broker/SessionManager.cpp: Manage suspended sessions. Replaces SuspendedSessions. * cpp/src/qpid/broker/SessionState.cpp: Work with SessionManager. * cpp/src/qpid/broker/SessionHandler.cpp: Owns SessionState. * cpp/src/qpid/broker/Connection.h, .cpp: Owns session handlers. * cpp/src/qpid/broker/Broker.h: Added SessionManager member. * cpp/src/Makefile.am: Added broker/SessionManager.cpp * amqp.0-10-preview.xml: Added session-busy and channel-busy constants. * cpp/src/tests/.valgrind.supp-default: Added suppresssions for F7. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@578975 13f79535-47bb-0310-9956-ffa450edef68
* Added Dispatcher class (plus test). This converts incoming MessageTransfer ↵Gordon Sim2007-09-181-2/+61
| | | | | | framesets to Messages and pumps them to registered listeners. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@576935 13f79535-47bb-0310-9956-ffa450edef68
* In ClientChannel: Use subscribe and flush in place of get; use ↵Gordon Sim2007-09-121-0/+2
| | | | | | | | | | per-subscriber flow control for managing prefetches. In brokers Session: set credit to 0 when subscription is created (modified python tests accordingly) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@574979 13f79535-47bb-0310-9956-ffa450edef68
* Support for keyword args in session interfaceGordon Sim2007-09-101-7/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@574323 13f79535-47bb-0310-9956-ffa450edef68
* Client side support for message and delivery properties in header segments.Gordon Sim2007-09-101-4/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@574176 13f79535-47bb-0310-9956-ffa450edef68
* Implementation of execution.result on the client side Gordon Sim2007-09-061-0/+71
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@573359 13f79535-47bb-0310-9956-ffa450edef68