summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* NO-JIRA: Fix race condition in HA tests, remove useless test.Alan Conway2015-04-031-21/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1671124 13f79535-47bb-0310-9956-ffa450edef68
* Align run_test shell and Powershell versions. Changes the option syntax from ↵Stephen D. Huston2015-03-174-69/+165
| | | | | | two-hyphen to one. Fixes QPID-6399. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1667349 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6427: Fixed unit test build problem on RHEL 5.aconway2015-03-051-3/+7
| | | | | | RHEL5 compiler choked on some boost template magic, simplified the test. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1664479 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4710: adjust version checking used by new tx interop tests so as not to ↵Gordon Sim2015-03-041-3/+16
| | | | | | fail existing tests when either ptoron python lib is not on path or is 0.7 or earlier git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1664144 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4710: [AMQP 1.0] Support for transactions in qpid::messaging C++ client.Alan Conway2015-02-2712-63/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the "transactional retire and settle immediately" option for transactions as specified in AMQP 1.0 in the qpid::messaging C++ client. NOTE: Transactions over AMQP 1.0 require proton 0.9 or greater. With older versions, attempting a transactions over AMQP 1.0 will raise a link-detached exception "Node not found: tx-transaction" 1. Added descriptor list to Variant with support in Encoder and PnData. Required to support transactions, need to be able to create described lists. Variant changes are source and binary compatible. A Variant now has a Variant::List of descripors which can be numeric or string. Nested descriptors are implemented by putting multiple descriptors in the list. Other minor changes: - Variant refactor: don't delete impl on every assignment. - Add Variant constructors that take a string encoding. (new constructors, not defaulted arguments, so the change is binary and source compatible.) - Growable buffer support for Encoder. - Printing described Variant prints descriptors in form @descriptor value 2. Added transaction support to AMQP 1.0 client code Added messaging/amqp/Transaction.h,cpp: transaction logic - communicate with coordinator, send declare/dischange messages. - add tx state info to transfers and acknowledgements. - Sync session after discharge. - A transactional session automatically acks any message retrieved by fetch/get to bring them into the transaction. This is consistent the 0-10 client. Minor fixes to existing client code: - Fix use of pn_drain API in C++ client to work with C++ and Java brokers. - Make amqp::Exception derive from qpid::Exception 3. Fixes to existing broker code: - Incoming.cpp fix: start async completion before processing message. - Delay accept of dischage message till commit is complete. - newSession - handle failover during session creation. 4. Added tests interop_tests.py: transaction tests that can run against an external broker, see comments. ha_tests.py: Enable transaction tests over AMQP 1.0. Minor test fixes: - brokertest.py don't set default logging if QPID_LOG env vars set. - brokertest.py Pass kwargs to broker() create function. - qpid-receive: capacity should never be larger than message count. - Accept user:pass as well as user/pass in Url. - brokertest.py: Always do a ready() check on all brokers. If proton < 0.9 is used, transaction tests will be skipped or will downgrade to the amqp0-10 protocol with a printed warning. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1662743 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6415: Core dump in ha_tests and interlink_tests with proton 0.9 (test fix)Alan Conway2015-02-261-0/+1
| | | | | | Minor test fix to avoid core dumps git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1662583 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6414: Skip HA tests if qpid-ha or qpid-config tools are not available.Alan Conway2015-02-253-14/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1662275 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6413: Sporadic failure of HA tests causd by maxNegotiateTimeoutAlan Conway2015-02-251-11/+11
| | | | | | | | | | | | | | | | | | | | Increased maxNegotiateTimeout to the default (10 seconds). A smaller value speeds up detection of non-running brokers on remote hosts, but this is not necessary for the tests. Increased some other test timeouts and added some improved error reporting. The occasional long (> 1 second) connection delays are caused by Cyrus SASL authentication. Not clear why this takes so long, but that is a separate issue. Here's a client log excerpt showing the delay. 2015-02-25 08:29:37.461299895 [Network] trace RECV [[127.0.0.1:34247-127.0.0.1:45983]]: Frame[BEbe; channel=0; {ConnectionStartBody: server-properties={qpid.federation_tag:V2:36:str16(77800bff-a176-46c1-917a-32f136dee650)}; mechanisms=str16{V2:9:str16(ANONYMOUS), V2:5:str16(PLAIN)}; locales=str16{V2:5:str16(en_US)}; }] 2015-02-25 08:29:37.463116303 [Security] debug CyrusSasl::start(ANONYMOUS PLAIN) (Note delay > 1 sec here) 2015-02-25 08:29:38.839793753 [Security] debug min_ssf: 0, max_ssf: 256 2015-02-25 08:29:38.839851781 [Security] debug CyrusSasl::start(ANONYMOUS PLAIN): selected ANONYMOUS response: 'anonymous@wallace' 2015-02-25 08:29:38.839963162 [Client] warning Connection [127.0.0.1:34247-127.0.0.1:45983] closed git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1662247 13f79535-47bb-0310-9956-ffa450edef68
* 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
* Apply patches for QPID-6312 to get Qpid building on AIX with XL C++ 13.1Stephen D. Huston2015-02-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1657338 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5538: Implement AMQP 1.0 connection idle-timeout.Ken Giusti2015-02-022-0/+96
| | | | | | Original patch by Gordon Sim. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1656505 13f79535-47bb-0310-9956-ffa450edef68
* txshift: switch to uint for workersDarryl L. Pierce2015-01-211-2/+2
| | | | | | | | | | | | | workaround missing size_t implementation of po::value_semantic* create_value(T& val, const std::string& arg) as it would conflict with when size_t == unsigned int even when it would help for size_t == unsigned long fixes https://issues.apache.org/jira/browse/QPID-6135 Contributed by Dan Horaz <dan@danny.cz> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1653631 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6329: slightly more forgiving equivalence check on fieldvalues in ↵Gordon Sim2015-01-211-0/+15
| | | | | | assertions on 0-10 path git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1653548 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Use absolute path for store directory in brokertest.pyAlan Conway2014-11-271-1/+1
| | | | | | Recent store changes broke the use of a relative directory as data-dir. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1642246 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix qpid-cpp-benchmark to work with activemq broker.Alan Conway2014-11-221-2/+8
| | | | | | | The activemq broker appears not to respect the AMQP drain flag, so calling fetch() on an empty queue hangs. Use get() with a timeout instead to drain the queues. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1641027 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix qpid-cpp-benchmark to support AMQP 1.0.Alan Conway2014-11-211-22/+63
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1640975 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6167: allow 0-10 to be disabledGordon Sim2014-11-101-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1637822 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5361: No tests for linearstore functionality currently exist - basic ↵Kim van der Riet2014-09-167-0/+792
| | | | | | tests from the legacystore suite ported to linearstore git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1625283 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix error message test in acl.py, on older python versions error ↵Alan Conway2014-09-091-10/+10
| | | | | | code is '7L' instead of '7' git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1623856 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix minor bug in run_paged_queue_tests handling a failure to start ↵Alan Conway2014-09-051-1/+1
| | | | | | broker. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622593 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: HA Fix ha_tests.py failures with SWIG 0.10 client.Alan Conway2014-09-052-39/+29
| | | | | | | | - Fix un-necessary re-sends in amqp0_10::SenderImpl::replay. - Throw NotFound and UnauthorizedAccess correctly from amqp0_10::SessionImpl and ConnectionImpl - Fix ha_test wait_address and valid_address re-using a session after it is closed by NotFound. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622592 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix qpid/cpp/src/tests/ha_tests.py to work on python 2.4.Alan Conway2014-09-041-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622560 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
* NO-JIRA: Explictily convert double to uint64_t in qpid-txtest2 to avoid ↵Alan Conway2014-09-031-1/+1
| | | | | | warnings on some compilers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1622372 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
* QPID-5855: Fix to JAVA Client Can not recieve message with qpid ha cluster.Alan Conway2014-08-291-2/+4
| | | | | | | | | | | | | | The original fix for this introduced a regression, running the qpid-txttest2 test against a cluster with the linear store failed. This fixes the fix. - Run transaction commit logic when the commit completes. Report completion to the user only when all prior commands have completed (sync point) - Fix missing initializer in client/amqp0_10/SessionImpl.cpp for transaction committing flag. - Remove annoying log messages from IdSetter.h - Skip transactional messages in prepare, don't wait till commit. - Added fetch-timeout option to qpid-txtest2 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1621368 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: brokertest.py: don't use AMQP 1.0 if not available, ignore ↵Alan Conway2014-08-281-4/+5
| | | | | | connection close teardown errors. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1621212 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5975: HA extra/missing messages when running qpid-txtest2 in a loop ↵Alan Conway2014-08-283-13/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with failover. This is partly not-a-bug, there is a client error handling issue that has been corrected. qpid-txtest2 initializes a queue with messages at the start and drains the queues at the end. These operations are *not transactional*. Therefore duplicates are expected if there is a failover during initialization or draining. When duplicates were observed, there was indeed a failover at one of these times. Making these operations transactional is not enough to pass, now we see the test fail with "no messages to fetch". This is explained as follows: If there is a failover during a transaction, TransactionAborted is raised. The client assumes the transaction was rolled back and re-plays it. However, if the failover occurs at a critical point *after* the client has sent commit but *before* it has received a response, then the the client *does not know* whether the transaction was committed or rolled-back on the new primary. Re-playing in this case can duplicate the transaction. Each transaction moves messages from one queue to another so as long as transactions are atomic the total number of messages will not change. However, if transactions are duplicated, a transactional session may try to move more messages than exist on the queue, hence "no messages to fetch". For example if thread 1 moves N messages from q1 to q2, and thread 2 tries to move N+M messages back, then thread 2 will fail. This problem has been corrected as follows: C++ and python clients now raise the following exceptions: - TransactionAborted: The transaction has definitely been rolled back due to a connection failure before commit or a broker error (e.g. a store error) during commit. It can safely be replayed. - TransactionUnknown: The transaction outcome is unknown because the connection failed at the critical time. There's no simple automatic way to know what happened without examining the state of the broker queues. Unfortunately With this fix qpid-txtest2 is no longer useful test for TX failover because it regularly raises TransactionUnknown and there's not much we can do with that. A better test of TX atomicity with failover is to run a pair of qpid-send/qpid-receive with fail-over and verify that the number of enqueues/dequeues and message depth are a multiple of the transaction size. See the JIRA for such a test. (Note these test also sometimes raise TransactionUnknown but it doesn't matter since all we are checking is that messages go on and off the queues in multiple of the TX size.) ) Note: the original bug also reported seeing missing messages from qpid-txtest2. I don't have a good explanation for that but since the qpid-send/receive test shows that transactions are atomic I am going to let that go for now. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1621211 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6049: ensure nss is initialised (and shutdown) for 1.0 connections; add ↵Gordon Sim2014-08-271-2/+13
| | | | | | 1.0 based ssl test git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1620948 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6035: HA clearly distinguish qpid-ha commands intended for cluster manager.Alan Conway2014-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a --cluster-manager flag to qpid-ha tool. Without this flag - the 'promote' command is not listed in the tool help. - using the promote command raises an error saying that it is only for cluster manager use and mentioning the --cluster-manager flag. With the flag: promote functions as before. The qpid-ha help text for promote is also more clear now that it is for cluster manager only. Originally the idea was to split qpid-ha into two tools but I have kept one tool with the flag and warning messages because it: - avoids packaging changes that might trip things up. - helps people who are already using qpid-ha promote: their scripts will break but the error message explains how to fix it. I think the special role of promote is sufficiently clear now even if it is part of the same tool. This commit also updates the following to take account of the new flag: - rgmanager qpidd-primary script. - qpidd tests. - qpid book HA chapter. NOTE: THIS WILL BREAK TEST HARNESSES that do promotion outside of rgmanager. You'll need to add the --cluster-manager flag in the relevant places. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1619877 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5855: JAVA Client Can not recieve message with qpid ha cluster "Session ↵Alan Conway2014-08-221-1/+34
| | | | | | | | | | | | | | | | | | | exception occured while trying to commit" The problem: the java client sets the sync flag on tx.commit and then waits for completion of the entire transaction. According to the 0-10 spec, this is correct, the commit (or rollback) will not complete until all of the transactional commands have completed. However the C++ broker was sometimes completing a commit *before* one of the the corresponding enqueues. It issued the completions up to the commit (because the commit is makred sync) but there is a "hole" for the incomplete enqueue. The enqueue is not marked sync so when this hole is filled no completion is sent and the client hangs. Fix: make tx.commit a "sync point", that is it behaves like execution.sync and is not completed till all preceeding commands are complete. Note tx.rollback does not need modification as it is never completed asynchronously. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1619816 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Clean up test_store.cpp async functionality.Alan Conway2014-08-223-70/+140
| | | | | | Clean up test_store.cpp to allow control over async completion of messsages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1619814 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: test_env.sh to pick up whichever of linearstore.so or ↵Alan Conway2014-08-201-1/+2
| | | | | | legacystore.so is built. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1619236 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6020: HA logging improvements - log prefix with status and ID.Alan Conway2014-08-191-2/+2
| | | | | | | | | | | | | | | | | Include broker status and ID in (almost) all logging messages. Makes it much easier to track broker state and interactions. Sundry other logging improvements including: - Demote noisy messages to trace - connections from rgmanager status checks, searching for primary. - Rationalise start-up messages. - Improved queue state detail replicating subscription and queue guard initialization. - Fail to prepare TX is error. - Collect all primary TX errors into one. - Fix status of catchup brokers in primary membership for logging. - Add process name/PID info to client connection messages. - Various minor message tweaks. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1619003 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5985: fixed regression introduced by previous commit (r1617256), ↵Gordon Sim2014-08-141-0/+15
| | | | | | ensuring that call does not block indefinitely git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1617924 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5985: check for incoming messages - without waiting - even when timout is 0Gordon Sim2014-08-111-0/+25
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1617256 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5966: HA mixing tx enqueue and non-tx dequeue leaves extra messages on ↵Alan Conway2014-08-083-10/+76
| | | | | | | | | | | | | | | | | | | | | backup. There were several problems: 1. Positions of transactionally enqueued messages not known to QueueReplicator, so not dequeued on backup if dequeued outside a TX on primary. 2. Race condition if tx created immediately after queue could cause duplication of TX message. 3. Replication IDs were not being set during recovery from store (regression, store change?) Fix: 1. Update positions QueueReplicator positions via QueueObserver::enqueued to see all enqueues. 2. Check for duplicate replication-ids on backup in QueueReplicator::route. 3. Set replication-id in publish() if not already set in record(). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1616704 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5973: HA cluster state may get stuck in recoveringAlan Conway2014-08-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | A backup queue is considered "ready" when all messages up to the first guarded position have either been replicated and acknowledged or dequeued. Previously this was implemented by waiting for the replicationg subscription to advance to the first guarded position and wating for all expected acks. However if messages are dequeued out-of-order (which happens with transactions) there can be a gap at the tail of the queue. The replicating subscription will not advance past this gap because it only advances when there are messages to consume. This resulted in backups stuck in catch-up. The recovering primary has a time-out for backups that never re-connect, but if they connect sucessfully and don't disconnect, the primary assumes they will become ready and waits - causing the primary to be stuck in "recovering". The fixes is to notify a replicating subscription if it becomes "stopped" because there are no more messages available on the queue. This implies that either it is at the tail OR there are no more messags until the tail. Either way we should consider this "ready" from the point of view of HA catch-up. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1616702 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5888: Fix test to ignore occasional TransactionAborted failures on ↵Alan Conway2014-07-291-1/+2
| | | | | | connection.close. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1614331 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5921, QPID-5923: adjustments and exclusions for new tests using swigged ↵Gordon Sim2014-07-242-0/+9
| | | | | | client git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1613131 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4123: C++ Broker ACL creates too many rulesCharles E. Rolke2014-07-232-3/+191
| | | | | | | | | | | | | | | | | | | | | | | Recent changes have added new tables to define what are ACL lookups and their properties. This commit finishes that work by not propagating rules that will never match. Also, it completes the scaffolding for allowed and denied host lists to be fully integrated. This commit: * Adds startup logging of ACL validation tables with cross references to possible rule matches. * Hooks the ACL host allow/deny connection lists into self test. * Fixes self tests that get broken by proper rule table handling. * Introduces a 'create connection' decision mode similar to ACL rule decision mode. * Describes it all in doc book. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1612874 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5888: transaction should always be aborted on failoverAlan Conway2014-07-182-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | C++ and python clients were attempting to continue the transation transparently after failover which is in correct. They were re-sending messages in the transaction but there is no way to re-do transactional receives. The transaction must be aborted. The C++ and python clients have been modified to kill a transactional session with a TransactionAborted exception if there is a failover. Note the Java client already behaves correctly but not identically. It defers raising an exception until commit rather than failing immediately on failover, and the session can still be used. The following commits are involved: r1611349 QPID-5887: revised approach to implict abort r1610959 QPID-5887: allow qpid-txtest2 to be run by make test r1610958 QPID-5887: fix to new txtest2, acknowledge messages in the check phase to ensure queues remain drained for any subsequent runs r1609748 QPID-5887: abort transactional session on failover; added equivalent of txtest using messaging API This commit does the following: - Update ha_tests.py tx_simpler_failover test to expect transaction aborted. - Minor improvements to qpid-txtest2 - Fix native (non-swig) python client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1611748 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5887: revised approach to implict abortGordon Sim2014-07-171-10/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1611349 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5898: AclHost unit test fails on systems with no IPv6Charles E. Rolke2014-07-161-58/+105
| | | | | | | | | | | | | * In SocketAddress::isComparable catch exceptions thrown by getAddrInfo when address family is not supported. * Delete self test that expects hosts to have 127.0.0.1 and ::1 as valid addresses for localhost. * In self tests sense whether IPv4 and IPv6 are supported and skip running tests that use those families accordingly. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1611059 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5898: Self tests fail on systems with IPv6 disabled.Charles E. Rolke2014-07-161-30/+30
| | | | | | | Temporarily disable tests that assume IPv6 to restore automated testing. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1610992 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5887: allow qpid-txtest2 to be run by make testGordon Sim2014-07-163-2/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1610959 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5887: fix to new txtest2, acknowledge messages in the check phase to ↵Gordon Sim2014-07-161-0/+1
| | | | | | ensure queues remain drained for any subsequent runs git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1610958 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4947: C++ Broker ACL restricts hosts from which users may connect.Charles E. Rolke2014-07-153-9/+132
| | | | | | | | | | | | | | | | | This commit adds: * Acl rule file "create connection host=hostname" support for allowing and denying connections. * AclHost class to represent a host specified in the rule file. * Global and user-specific lists of AclHost rules. Created by AclReader and consumed by AclConnectionCounter. * Address range checks and other giblets in SocketAddress: ** asString support to hide IPv6 decoration and service (port) details. ** binary comparison of network addresses. ** new firstAddress function to complement existing nextAddress. Socket addrinfo for AclHost objects is computed once only for lifetime of Acl file load. ** Posix and Windows implementations are identical. * New unit test for address comparisons. Testing a live broker is great but forcing connections to be from some arbitrary IPv4 or IPv6 address is hard. So there's a unit test for that. Further discussion about this feature is in https://reviews.apache.org/r/23322 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1610874 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5890: Improve Acl enum verificationCharles E. Rolke2014-07-121-13/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1609900 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5890: Refactoring AclModule.hCharles E. Rolke2014-07-112-0/+158
| | | | | | | | | | | | | * make single instances of strings associated with enums * make more compact search functions * make string definitions const * return 'const string&' instead of copies of temporaries * add self test as string defs sanity check * export AclHelper to satisfy tests (!!) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1609828 13f79535-47bb-0310-9956-ffa450edef68