summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* QPID-4604: C++ Broker queue limits controlled by ACL file. Patch from Ernie ↵Charles E. Rolke2013-03-011-39/+123
| | | | | | | | | | Allen. See https://reviews.apache.org/r/9703/ git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1451737 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4582: Legacystore self test fail. Remove them from the test buildCharles E. Rolke2013-03-011-1/+1
| | | | | | | | until the tests are rewritten to account for porting issues. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1451642 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4607: C++ Broker connection limit counting failsCharles E. Rolke2013-02-271-68/+78
| | | | | | | | | | | | | | | Repair a few small but critical errors in program logic. Repair several misconceptions in the self test including: * provide visibility to connections (not sessions) so that they may be closed. * dodge names that may survive open connections from other tests. Tests may pass if run first but then fail if run 30th. The whole acl.py module could use a clean up pass to close out the 50+ open connections that exist that the end of the test. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1450841 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4601: HA backup broker shuts down after redeclaring exchangeAlan Conway2013-02-261-0/+15
| | | | | | | There was a bug in ExchangeRegistry, it was always setting disp=created even if the exchange was already present. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1450383 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4603: Teach qpid-send to send bool/int/float properties as well as stringsAndrew Stitcher2013-02-261-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1450289 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4116: Allow the path to qpid-send and qpid-receive programs to be ↵Gordon Sim2013-02-151-3/+7
| | | | | | specified; patch from Pavel Moravec. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1446578 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Rationalised unit test buildAndrew Stitcher2013-02-141-37/+48
| | | | | | | | | - Made an empty list of unit tests to build actually build all tests and made the default list empty, this gives much better behaviour in the usual case when adding and removing tests - Also sorted list of unit tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1446233 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4054: C++ Broker connection limits specified per-userCharles E. Rolke2013-02-123-1/+78
| | | | | | | | | | | | | | From the self-test log file: 2013-02-12 15:33:53 [Broker] notice Changing log hires timestamp to 1 2013-02-12 15:33:53.219003940 [Broker] debug Broker::setLogHiresTimestamp() ... 2013-02-12 15:33:53.491318800 [Broker] notice Changing log hires timestamp to 0 2013-02-12 15:33:53 [Broker] debug Broker::setLogHiresTimestamp() git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1445358 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4054 C++ Broker connection limits per userCharles E. Rolke2013-02-091-7/+215
| | | | | | | | | | | | | | 1. Constrain maximum limits to be a few ticks below Uint16_t max to avoid inadvertent wrapping and to allow room for some named constants such as UNLIMITED. 2. Add syntax to Acl rule file quota connections N user|group [user|group] 3. Pseudo user 'all' receives value from command line switch or from Acl rule file. 4. Named constant strings used in comparisons instead of local strings. 5. Connection counts maintained all the time to support reolad of Acl rule file that may change limits. 6. Self tests exercise all the features. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1444302 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4555: HA Primary sets explicit qpid.replicate in Queue and Exchange ↵Alan Conway2013-02-071-7/+11
| | | | | | | | | | | | | | | arguments. Previously both Primary and Backup would calculate the qpid.replicate value independently, assuming the result would be the same. In the case of exclusive queues, the exclusivity can change over time so its possible that primary and backup won't agree. Now only Primary does the calculation with exclusive, auto-delete etc. and puts an explicity qpid.replicate in the queue or event arguments. Backup uses the value set by primary. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1443678 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4555: HA Check for backup ready when new backup joins.Alan Conway2013-02-071-0/+2
| | | | | | | | | This test was missing so if there were no backed-up queues the backup would never be marked ready. It was workig because of a separte bug: auto-delete/exclusive queues were being replicated incorrectly so there were always replicated queues (temp queues created by qpid-ha) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1443677 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4555: HA Test bugs causing sporadic faiulres in ↵Alan Conway2013-01-312-12/+19
| | | | | | | | | | | | ha_tests.ReplicationTests.test_auto_delete_timeout The tests were not waiting for the cluster to be ready before starting. Updated HaCluster to wait by default before returning. Increase timeout in calls to wait_no_queue, the default timeout of 1 sec was the same as the auto-delete timeout. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1441157 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4546: review feedback and re-enable federation system testsKenneth Anthony Giusti2013-01-221-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1437188 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Add brokertest.py to EXTRA_DIST, required by ha_tests.py.Alan Conway2013-01-141-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1433143 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Clean up cluster code: remove unused testlib.pyAlan Conway2013-01-141-766/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1433072 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Clean up cluster code: sasl_fed_ex testAlan Conway2013-01-141-81/+11
| | | | | | Clean up obsolete code sasl_fed_ex related to defunct cluster testing. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1433056 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Clean up cluster code: Obsolete management import/export functions.Alan Conway2013-01-141-355/+0
| | | | | | Remove management fucntions used to import/export data from the cluster module. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1433054 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4516: Sporadic failure in ha_tests test_failover_send_receiveAlan Conway2013-01-111-5/+8
| | | | | | | | | | | | | | Several fixes were required in the code to correct this problem: - Missing break statement in switch. - Remove unused function HaBroker::resetMembership - Abort connection of timed-out backups so they can attempt to reconnect. - New primary resets membership before allowing backups to connect. - Test for and ignore double-promotion. - HaBroker: dynamic logPrefix() shows status. Made status atomic for efficient access for log messages. - Update primary status in membership. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1432273 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1726 ASF licensed QPID store - reenable in buildCharles E. Rolke2013-01-102-1/+7
| | | | | | | | Add new legacystore.cmake to EXTRA_DIST in makefile suite. Fix cmake scripts for core library and tests. Note: Tests are not truly integrated. Four standalone unit tests are starters for proving functionality. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1431635 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Expand Variant tests to test previous Variant conversion checkinAndrew Stitcher2013-01-101-0/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1431493 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1726 ASF licensed Qpid store - disable building this componentCharles E. Rolke2013-01-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1430338 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1726 ASF licensed Qpid StoreCharles E. Rolke2013-01-0723-0/+3281
| | | | | | | | | | | | | | | | | | | | | | | | Add unit tests. There are several issues with these tests: 1. Originally the four .cpp unit test sources were compiled into a single unit_test executable. In the current framework those four sources create conflicting brokers that overwrite each other's store and fail to open port 5672. In this checkin there are four unit test executables. Running each serially gets them all to pass. A new strategy is needed to start brokers that don't conflict. 2. The legacystore.so is not integrated with the rest of the tests. Some tests may run with the externally compiled msgstore.so and some use the built in test_store. Plugging legacystore.so into these other tests is TBD. 3. cpp/src/tests/legacystore defines more tests beyond simple unit tests. None of the issues related to wider system tests are addressed yet. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1430018 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: slim down some header file inclusionsAndrew Stitcher2013-01-042-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1428722 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Remove obsolete cluster code: brokertest.pyAlan Conway2013-01-031-85/+7
| | | | | | Clean up cluster obsolete code in brokertest.py. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1428634 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Removed Timer.h out of the chain of header files included by Broker.hAndrew Stitcher2012-12-211-0/+1
| | | | | | (since that is widely included) to avoid unnecessary recompilation git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1425037 13f79535-47bb-0310-9956-ffa450edef68
* Bug 886656 - HA backup broker does not properly increment the alternate ↵Alan Conway2012-12-201-7/+28
| | | | | | | | exchange user count Set alternate exchange in-use counters correctly on backup brokers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424617 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Repair include guards that are absent or fail to encompass everything.Charles E. Rolke2012-12-201-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424499 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Remove obsolete cluster code: still more testsAlan Conway2012-12-1914-2126/+168
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424141 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Remove obsolete cluster code: more testsAlan Conway2012-12-1914-1411/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424140 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Remove obsolete cluster code: cleanup testsAlan Conway2012-12-1925-4517/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424139 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Remove obsolete cluster code: obsolete valgrind suppressions.Alan Conway2012-12-191-23/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424138 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Removed old cluster only fileAndrew Stitcher2012-12-181-117/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1423529 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4506: Qpid HA's '--ha-public-url' option duplicates the ↵Alan Conway2012-12-142-7/+43
| | | | | | | | | | | | | | '--known-hosts-url' option but cannot be disabled Reverts the previous commit and simplifies the semantics of setting --ha-public-url and --ha-brokers-url. There is no longer any over-riding or implicit updating of values. That means you must set --ha-public-url as well as --ha-brokers-url, it will not be defaulted. Likewise if you *dont* set ha-public-url, it will remain empty, which is the use case in this bug. The defaulting was adding complexity without adding much value. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1421934 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4481: HA replication of propagated bindings can lead to incorrect ↵Alan Conway2012-12-113-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | configuration When using dynamic federation between two independent HA broker clusters, it is possible under certain failover scenarios for the propagated bindings on the source broker to become out-of-sync with the true state of bindings on the destination broker. How reproducible: Often -- race condition between re-establishment of federated link and the deletion of a binding on the destination broker Steps to Reproduce: 1. Start a stand-alone broker (route destination) and an HA broker (route source w/ primary and backup) 2. Configure a dynamic federated route between a destination broker and a source broker. The dynamic federation needs to utilize an existing, non-auto-delete queue on the source broker. 3. Subscribe to an auto-delete queue on the destination broker and bind the auto-delete queue to the exchange configured for the dynamic federation 4. Kill the primary source broker 5. Kill the subscription to the auto-delete queue on the destination broker 6. Promote the backup source broker to primary Actual results: With the loss of the client subscription to the auto-delete queue, the binding will be removed. If the binding is removed prior to the re-establishment of the federated link to the source broker, the unbind command will not propagate. Since the backup source broker had previously replicated the propagated binding, the binding will incorrectly remain on the source broker. Expected results: Propagated bindings should not be replicated from the primary to backups since they are transient and will be recreated when the route is re-established.))) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1420438 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4498: HA module should only initialize if requested Alan Conway2012-12-101-4/+8
| | | | | | | | | | This commit provides better control over loading the HA module. In particular it is not loaded if no ha options are set. This will prevent clashes with the old cluster plugin in configurations where the HA module is not explicitly used. HA documentation has been updated to state that HA and old cluster cannot be used together. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1419850 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix race condition in brokertest.py test harness.Alan Conway2012-12-071-1/+3
| | | | | | | Fixed a race conndition that was causing false failures of the form "expected an error". git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1418417 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3723: further refinement to the change to link against the .la files, ↵Gordon Sim2012-12-062-12/+13
| | | | | | rather than use the unqualified lib names git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1418000 13f79535-47bb-0310-9956-ffa450edef68
* QPID_4449 - Further fixes to the build files for both automake and cmake.Ted Ross2012-12-031-2/+2
| | | | | | | Fixed some build issues affecting Windows. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1416594 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4449 - Reverted much of the original change and re-implemented the fix ↵Ted Ross2012-11-303-27/+30
| | | | | | | | | | in a simpler way. The build-define _IN_QPID_BROKER is now used for modules built in the broker. The shared-pointer changes are conditionally compiled only for in-broker cases. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1415796 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3723: Applied patch from Fraser Adams for explicit linkingGordon Sim2012-11-292-12/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1415137 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4449 - Fixed the API in qpid::management::Manageable to remain backward ↵Ted Ross2012-11-202-33/+33
| | | | | | compatible. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1411761 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Removed unused isLocalHost() codeAndrew Stitcher2012-11-161-16/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1410360 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4401: Revert: HA bindings for QMF exchanges not replicated.Alan Conway2012-11-141-25/+0
| | | | | | | | | | This reverts r1403946: There was a problem with this, for example if I bind a queue Q to receive broker events. On the backup, Q will receive double events: from the replicating subscription to the primary and events generated locally in the backup broker. That can cause the backup to generate "invalid position" errors and shut down. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409243 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: avoid un-necessary warnings in ha_tests.py test_qmf_replication.Alan Conway2012-11-141-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409242 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4428: HA add UUID tag to avoid using an out of date queue/exchange.Alan Conway2012-11-142-3/+43
| | | | | | | | | | | | | | | | | Imagine a cluster with primary A and backups B and C. A queue Q is created on A and replicated to B, C. Now A dies and B takes over as primary. Before C can connect to B, a client destroys Q and creates a new queue with the same name. When B connects it sees Q and incorrectly assumes it is the same Q that it has already replicated. Now C has an inconsistent replica of Q. The fix is to tag queues/exchanges with a UUID so a backup can tell if a queue is not the same as the one it has already replicated, even if the names are the same. This all also applies to exchanges. - Minor imrovements to printing UUIDs in a FieldTable. - Fix comparison of void Variants, added operator != git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409241 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Suppress warning errors in ha_tests.py test_qmf_replication.Alan Conway2012-11-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409225 13f79535-47bb-0310-9956-ffa450edef68
* Bug 874118 - HA Deadlock in backup broker after disconnecting from primary.Alan Conway2012-11-091-8/+16
| | | | | | | | | | | The backup broker was running ExchangeRegistry::for_each to clean up connections, but this holds the ExchangeRegistry lock and hence the deadlock. Now we copy a list of exchanges with for_each and work on it without the lock. The issue showed up for 0 timeouts only because the queue schedules non-0 timeouts to a separate timer thread. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1407661 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4394: HA QMF events out of orderAlan Conway2012-11-011-0/+57
| | | | | | | | | | | | | | | | QMF create/delete events for auto-delete queues can be generated out-of-order because they are not regulated by any lock. This creates problems for HA replication. This commit does 2 things: 1. Dispatch QMF events via a pollable queue. Events are encoded in the thread calling raiseEvent then put on a PollableQueue to be dispatched in a separate thread. This allows us to move the raiseEvent calls inside registry locks to ensure they are ordered. 2. Move queue create and delete raiseEvent calls inside the queue registry lock so they are executed in order. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1404590 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4401: HA bindings for QMF exchanges not replicated.Alan Conway2012-10-311-1/+23
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1403946 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: removed all remaining traces of unused alloca.hAndrew Stitcher2012-10-241-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1401831 13f79535-47bb-0310-9956-ffa450edef68