summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/BrokerFixture.h
Commit message (Collapse)AuthorAgeFilesLines
* Don't take the address of a 0-length vector. Fixes QPID-6409.Stephen D. Huston2015-02-241-5/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1661830 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6069: Extra fix to FreeBSD compile fixesAndrew Stitcher2014-09-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622397 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6069: FreeBSD compilation problemsAndrew Stitcher2014-09-031-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622369 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix defects found by coverity.Alan Conway2014-07-071-1/+1
| | | | | | | | | | | | | | | | | | To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/6?tab=overview ** CID 1224524: Big parameter passed by value (PASS_BY_VALUE) /qpidbuilds/trunk/qpid/cpp/src/tests/BrokerFixture.h: 155 in qpid::tests::SessionFixtureT<qpid::tests::LocalConnection, qpid::client::Session_0_10>::SessionFixtureT(qpid::broker::BrokerOptions)() ** CID 1224525: Big parameter passed by value (PASS_BY_VALUE) /qpidbuilds/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp: 108 in qpid::tests::ClientSessionFixture::ClientSessionFixture(qpid::broker::BrokerOptions)() ** CID 1224526: Big parameter passed by value (PASS_BY_VALUE) /qpidbuilds/trunk/qpid/cpp/src/tests/MessagingFixture.h: 106 in qpid::tests::MessagingFixture::MessagingFixture(qpid::broker::BrokerOptions, bool)() ** CID 1224527: Wrapper object use after free (WRAPPER_ESCAPE) /qpidbuilds/trunk/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp: 276 in qpid::broker::CyrusAuthenticator::init()() git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1608487 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3921: Refactored Broker::Options into its own independent classAndrew Stitcher2014-07-011-9/+13
| | | | | | | | | | - Now called BrokerOptions - Added extra getters to Broker so that nothing else needs to know about BrokerOptions - Significantly reduces header coupling as lots of files include Broker.h, but now don't need Options.h git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1607166 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: HA TX transactions: basic replication.Alan Conway2013-08-011-23/+47
| | | | | | | | | | | | | | | On primary a PrimaryTxObserver observes a transaction's TxBuffer and generates transaction events on a tx-replication-queue. On the backup a TxReplicator receives the events and constructs a TxBuffer equivalent to the one in the primary. Unfinished: - Primary does not wait for backups to prepare() before committing. - All connected backups are assumed to be in the transaction, there are race conditions around brokers joining/leavinv where this assumption is invalid. - Need more tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509423 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: restrict broker to listen only on loopback interface (which is all ↵Gordon Sim2013-06-131-0/+1
| | | | | | that gets used by clients) in order to avoid port collisions git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1492778 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4651: C++ Broker add --log-disable optionCharles E. Rolke2013-04-261-0/+1
| | | | | | | | Reviewed at https://reviews.apache.org/r/10799/ git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1476409 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: eliminate SocketProxy from tests.Alan Conway2011-08-181-25/+7
| | | | | | | | | Was causing problems with changes to introduce IPv6. In most cases this was being used unnecessarilly due to cut-and-paste of tests. In the 2 cases it was useful, replaced by simply shutting down the broker to simulate network failure. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1159268 13f79535-47bb-0310-9956-ffa450edef68
* Add a unit_test fixture for the Brokers internal management agent.Kenneth Anthony Giusti2010-12-011-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1041150 13f79535-47bb-0310-9956-ffa450edef68
* Disable non-0 session timeouts.Alan Conway2010-08-031-4/+4
| | | | | | | | | | Since session resume is not fully implemented, non-0 session timeouts are of no use. Moreover the partial implementation causes problems in a cluster as stale sessions kept alive by a timeout can interfere with failover and updates. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@981933 13f79535-47bb-0310-9956-ffa450edef68
* Fix memory leak in testCoincidentErrors due to un-joined connector thread.Alan Conway2009-10-301-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@831446 13f79535-47bb-0310-9956-ffa450edef68
* Make Session::close and Connection::close no-throwAlan Conway2009-10-271-1/+1
| | | | | | | close() will often be called in destructors and so should not throw exceptions. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@830268 13f79535-47bb-0310-9956-ffa450edef68
* Separate FailoverListener from client::Connection.Alan Conway2009-10-261-2/+2
| | | | | | | | | | | | | | | | | | client::ConnectionImpl used to contain a FailoverListener to subscribe for updates on the amq.failover exchange. This caused some lifecycle issues including memory leaks. Now FailoverListener is a public API class that the user must create associated with a session to get known-broker updates. Removed the weak_ptr logic in client::SessionImpl which was only required because of FailoverListener. Made SessionImpl::close() idempotent. Gets rid of spurious warning messages in some tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@829931 13f79535-47bb-0310-9956-ffa450edef68
* Pull running acceptor out of Broker run loopAndrew Stitcher2009-10-161-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@826033 13f79535-47bb-0310-9956-ffa450edef68
* Tidied up namespace usageAndrew Stitcher2009-09-091-3/+7
| | | | | | Miscelleneous whitespace fixes git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@813094 13f79535-47bb-0310-9956-ffa450edef68
* Remove incorrect directory from #includeAlan Conway2009-07-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@793912 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@793909 13f79535-47bb-0310-9956-ffa450edef68
* Further fix to new cluster member state transfer to fix a case where unacked ↵Gordon Sim2009-06-051-0/+1
| | | | | | messages on ring policy queue cause inconsistencies in queue state between nodes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@782075 13f79535-47bb-0310-9956-ffa450edef68
* Applied PIMPL pattern to SubscriptionManager.Alan Conway2009-05-041-0/+1
| | | | | | | Cleaned up some sloppy #includes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@771366 13f79535-47bb-0310-9956-ffa450edef68
* Fix issues when cluster is run with persistence enabled.Alan Conway2009-04-111-4/+6
| | | | | | | | | | - Handle partial failures (e.g. due to disk error): failing brokers shut down, others continue. - Enable persistence in cluster tests. - Correct message status in DeliveryRecord updates. - Remove qpid.update queue when update complete - avoid it becoming persistent git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@764204 13f79535-47bb-0310-9956-ffa450edef68
* Cluster security support:Alan Conway2009-02-121-0/+8
| | | | | | | | - Set correct user ID on update connections. - Allow configuration of user, pass and mechanism used for update connections. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@743839 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1567: Initial support for asynchronous queue state replicationGordon Sim2009-01-151-1/+7
| | | | | | | | | | | | | | | * Added QueueEvents class with per broker instance * Modified qpid::broker::Queue to notify QueueEvents of enqueues and dequeues (based on configuration) * Added replication subdir containing two plugins: - an event listener that registers with QueueEvents and creates messages representing received events on a replication queue - a custom exchange type for processing messages of the format created by the listener plugin * Added new option for controlling event generation to qpid::client::QueueOptions * Added new queue option to qpid-config script for the same git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@734674 13f79535-47bb-0310-9956-ffa450edef68
* Minor logging fixes.Alan Conway2009-01-051-1/+11
| | | | | | | | cpp/src/tests/BrokerFixture.h: make tests quiet, log with error+ qpid/broker/Daemon.cpp: print to stderr in parent process if child fails. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@731739 13f79535-47bb-0310-9956-ffa450edef68
* Add option to require that only encrypted connections be accepted.Gordon Sim2008-10-201-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@706321 13f79535-47bb-0310-9956-ffa450edef68
* Moved PollableCondition, PollableQueue and to sys. Fixed cluster shutdown ↵Alan Conway2008-09-111-1/+2
| | | | | | | | | | | | | | issues. sys/PollableCondition: is a generic mechansim to poll for non-IO events in the Poller. sys/PollableQueue: is a thread-safe queue template that can be dispatched from the Poller when there are items on the queue. It uses PollableCondition. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@694243 13f79535-47bb-0310-9956-ffa450edef68
* Switched from shared_ptr to intrusive_ptr and RefCounted for Broker.Alan Conway2008-07-151-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@676932 13f79535-47bb-0310-9956-ffa450edef68
* Cluster prototype: handles client-initiated commands (not dequeues)Alan Conway2008-07-041-5/+2
| | | | | | | | | | | | | | | | Details - Cluster.cpp: serializes all frames thru cluster (see below) - broker/ConnectionManager: Added handler chain in front of Connection::received. - sys::Fork and ForkWithMessage - abstractions for forking with posix impl. - tests/ForkedBroker.h: test utility to fork a broker process. - broker/SignalHandler: Encapsulated signal handling from qpidd.cpp - Various minor logging & error message improvements to aid debugging. NB: current impl will not scale. It is functional working starting point so we can start testing & profiling to find the right optimizations. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674107 13f79535-47bb-0310-9956-ffa450edef68
* Consolidated cluster tests in cluster_test.cppAlan Conway2008-06-261-15/+29
| | | | | | | Improvements to BrokerFixture for testing. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@671969 13f79535-47bb-0310-9956-ffa450edef68
* Changes to Session API:Alan Conway2008-05-261-1/+1
| | | | | | | | | | | - Session is synchronous, no futures. - AsyncSession is async, returns futures. - Conversion functions sync(s) async(s) return a sync/async view of session s. - Connection::newSession - takes name, no timeout - SessionBase::getId - returns SessionId not UUID. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@660258 13f79535-47bb-0310-9956-ffa450edef68
* QPID-648: Initial support for sasl authentication for c++ broker. From patch ↵Gordon Sim2008-04-141-0/+1
| | | | | | | | | | | | | submitted by mfarrellee@redhat.com. Authentication is optional at compile time (based on user selection or availability of cyrus sasl libs) and at runtime (through broker config option). Note: At present the runtime default is to not authenticate; this is a temporary measure to give some time for any automation scripts etc to be updated and will revert shortly to be on by default. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@647716 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-2/+2
| | | | | | | 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
* From Ted Ross, https://issues.apache.org/jira/browse/QPID-780Alan Conway2008-02-061-0/+1
| | | | | | | | | | | | | | | | Implementation of --data-dir for qpidd. Additions by myself: - set QPID_DATA_DIR= in test env so existing tests can run with no data dir. - src/Makefile.am and qpidc.spec.in install /var/lib/qpidd directory. NOTE: qpidd with no optoins will now FAIL if it cannot write /var/lib/qpidd. Start it with --data-dir= or set QPID_DATA_DIR= in your environement to run with no data directory. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@619200 13f79535-47bb-0310-9956-ffa450edef68
* Added testSendToSelf for https://bugzilla.redhat.com/show_bug.cgi?id=410551Alan Conway2008-02-051-0/+2
| | | | | | | | | | | | | | | | | | | | 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
* Improved/additional client API tests.Alan Conway2008-01-241-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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/SocketProxy.h: proxy between local client & server to simulate ↵Alan Conway2007-12-101-20/+0
| | | | | | | | | | | 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-0/+101
- 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