summaryrefslogtreecommitdiff
path: root/java/client/src/test
Commit message (Collapse)AuthorAgeFilesLines
* QPID-3401 Checking the proposed changes into a branch to preserve history & ↵address-refactorRajith Muditha Attapattu2011-10-141-7/+6
| | | | | | continue working until such time it's accepted into trunk. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/address-refactor@1183532 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3526, QPID-3524: make sure the 0-10 client message.acknowledge() ↵Robert Gemmell2011-10-061-1/+6
| | | | | | | | actually acknowledges messages immediately, and does so synchronously, adding test to verify behaviour. Split acknowledge() and commit() methods into version specific session implementations for clarity/reuse, align 0-10 and 0-8/9 transacted publishing behaviour, refactor preDeliver and postDeliver methods, remove dead code from consumers. Applied patch from Oleksandr Rudyy<orudyy@gmail.com> and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1179695 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3511: Removal of unused system property "qpid.default_wait_on_send" ↵Keith Wall2011-09-282-10/+17
| | | | | | | | from Java Client. Applied patch from Andrew MacBean <andymacbean@gmail.com> and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1176821 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3444: issue an invalid argument execution exception if the exchange ↵Robert Gemmell2011-09-251-1/+1
| | | | | | name is null or the empty string. Update some constants to ensure the error code is logged with the correct message git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1175625 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3415: Change 0-10 code path to utilise the CallbackHandlerRegistry to ↵Keith Wall2011-09-191-0/+185
| | | | | | create the correct CallbackHandler. The sasl_mechs property/broker option is retained, but continues to be understood only by the 0-10 path. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1172506 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3448: catch exceptions from the underlying Transport/Session/Connection ↵Robert Gemmell2011-09-131-0/+765
| | | | | | | | and rethrow as a JMSException like users are expecting Applied patch by Oleksandr Rudyy <orudyy@gmail.com> and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1170182 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2627 : Remove dependency on MINARobert Godfrey2011-09-092-12/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1167311 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3473 : Replace use of MINA IO with transport IO (joint work with Robbie ↵Robert Godfrey2011-09-071-312/+0
| | | | | | Gemmel) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1166069 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3395 Added a test case for this issue.Rajith Muditha Attapattu2011-08-311-0/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1163459 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3307: correct a couple style issues, add some basic unit testing for ↵Robert Gemmell2011-08-213-0/+202
| | | | | | ObjectMessage and the new CLAOIS git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1160002 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3434: Refactored 0-8..0-9-1 code paths to use same SSL configuration ↵Robert Gemmell2011-08-182-46/+3
| | | | | | | | mechanisms as 0-10. Apply work by myself and Keith Wall git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1159255 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3343: refactor test profiles to allow testing within the same JVM for ↵Robert Gemmell2011-07-076-184/+3
| | | | | | | | all protocols, remove vm:// transport support and associated forked Mina classes Applied patch by Keith Wall and myself git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1143874 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3342: transition TCP based Mina transport for 0-8/0-9/0-9-1 protocols ↵Robert Gemmell2011-07-072-31/+11
| | | | | | | | over to new IO interface model Applied patch by Keith Wall and myself git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1143867 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3277: AMQCallbackHandler improvements. Refactor AMQCallbackHandler to ↵Robert Gemmell2011-05-263-5/+177
| | | | | | | | accept ConnectionURL in place of AMQProtocolSession (improved information hiding, ease ability to write good unit tests). Remove unused protected constructor from AMQConnection and MockAMQConnection. Applied patch from Keith Wall <keith.wall@gmail.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1127939 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3220: Specifying connection url option failover='singlebroker' causes ↵Robert Gemmell2011-05-161-0/+338
| | | | | | | | | the wrong failover policy to be used. Wrote new unit test case and resolved the defect. Applied patch from Keith Wall <keith.wall@gmail.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1103857 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3233Rajith Muditha Attapattu2011-05-031-0/+6
| | | | | | | | If the underlying AMQP session gets closed, the JMS session is now notified along with details that caused the session closure. The JMS Session will throw an exception (with an error code and details) when a user accesses the closed session. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1099288 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3099Rajith Muditha Attapattu2011-03-011-0/+31
| | | | | | | | | | Added logic to look for the 'host' in the authority field if getHost returns null. Looking at the code that follows, you could definitely make more improvements. However since we are close to the 0.10 release I'd leave things as it is for the time being. I have also added test cases to cover the issues highlighted by the respective JIRA. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1076011 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2857 : Address issues found by running FindBugs against the Java codebaseRobert Godfrey2010-09-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@998162 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2857 : Address issues found by running FindBugs against the Java codebaseRobert Godfrey2010-09-121-2/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@996393 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2418: updates to fix test failures when using the 0-10 client test ↵Robert Gemmell2010-09-051-0/+7
| | | | | | | | | | | profiles. Use a transacted session when querying for queue counts following consumption, as the 0-10 client batches auto-acks asynchronously. Always send the selector filter argument even if empty, to allow querying the brokers via 0-10 to detect whether the selector is being added/removed/modified at subscribe time. Enable the Java broker to perform argument matching during the 0-10 isBound check. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@992856 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2697: Print AMQConnectionURL optionsAndrew Donald Kennedy2010-07-261-0/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@979212 13f79535-47bb-0310-9956-ffa450edef68
* Commiting the patch attached to QPID-2471Rajith Muditha Attapattu2010-04-141-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@934236 13f79535-47bb-0310-9956-ffa450edef68
* I have added the license header to the files included in this commit.Rajith Muditha Attapattu2010-02-121-0/+21
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@909641 13f79535-47bb-0310-9956-ffa450edef68
* This is related to QPID-1831Rajith Muditha Attapattu2010-02-031-0/+8
| | | | | | | | I added the patch attached to the above JIRA with modifications. The modifications include integration with the address parser added by Rafi, and several refactoring and bug fixes to the original patch. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@906142 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2340 : Fix ProducerFlowControlTest to call a synchronous operation ↵Robert Godfrey2010-01-141-0/+4
| | | | | | between sends (merged from 0.5-dev) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899301 13f79535-47bb-0310-9956-ffa450edef68
* Merge java-network-refactor branchAidan Skinner2009-10-151-3/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@825362 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1809 - The incorrect expcetions were due to a race condition between ↵Martin Ritchie2009-09-042-10/+3
| | | | | | | | the mina exception notification thread and the clients main thread blocking for a frame. Occasionally, the client will start blocking just after the notification and so will Timeout. This update ensures that blocking does not occur if the connection has been marked closing or is closed. The lastException set on the StateManager is thrown instead. The connection close also needed to take into consideration this fact. The syncWrite on for ChannelClose and ConnectionClose are now only down if we are not in a closing situation. As the 0-10 code path does not use the StateManager the changes were applied to the 0-8 Session. Further testing may be needed to validate that the 0-10 client code path does not also have this race condition. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@811471 13f79535-47bb-0310-9956-ffa450edef68
* This is related to QPID-1875Rajith Muditha Attapattu2009-05-281-0/+12
| | | | | | | | The BindingURLParser is updated to grab the clientID and subscription to form the queue name. I also added a test case to cover this. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@779651 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1824 : Add ability to use a ConnectionURL String to configure a ↵Martin Ritchie2009-04-211-0/+75
| | | | | | ConfigurationFactory via a 3rd party tools that use Bean properties such as Mule or Spring. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@767150 13f79535-47bb-0310-9956-ffa450edef68
* This is a test case for QPID-1777Rajith Muditha Attapattu2009-03-312-0/+98
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@760305 13f79535-47bb-0310-9956-ffa450edef68
* Fix for QPID-1761 and QPID-1762: made BBEncoder.grow() flip the buffer ↵Rafael H. Schloming2009-03-202-2/+2
| | | | | | before copying; added a BBEncoder test; made unrecognized mime types default to BytesMessage; added logging of exception root cause to AMQSession; fixed miscelaneous test failures git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@756328 13f79535-47bb-0310-9956-ffa450edef68
* This is related to QPID-1720Rajith Muditha Attapattu2009-03-061-0/+13
| | | | | | | The fix is a bit of a hack, but I don't see another way to handle it. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@751061 13f79535-47bb-0310-9956-ffa450edef68
* Made the various receive variants check that the server queue is empty ↵Rafael H. Schloming2009-02-251-2/+5
| | | | | | before returning null. Also modified AMQQueueBrowser to use receiveNoWait() when browsing queues using 0-10. These changes uncovered numerous second order bugs, mostly in failover. These are also fixed. This fixes QPID-1642 and QPID-1643. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@747963 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1623: Allow null as a valid destination for JMSReplyToAidan Skinner2009-02-111-0/+36
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743367 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1487: Make AMQDestination generate URLs with a destination set to the ↵Aidan Skinner2008-11-261-0/+42
| | | | | | routing key. Add a test for this. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720919 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1431 : Prevent listeners being added to _frameListeners when an ↵Martin Ritchie2008-11-063-0/+703
| | | | | | exception state has occured due to connection closure. This adds additional synchronisation to the error handling condition. It also removes the need for a CopyOnWriteArrayList that was perhaps the wrong data structure for this list. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711822 13f79535-47bb-0310-9956-ffa450edef68
* This is related to QPID-1319Rajith Muditha Attapattu2008-10-231-11/+0
| | | | | | | | Agree with Aidan that SSL should only be a broker level option. I have removed the code that copied the top level ssl value to the broker options. I will also correct the examples on the qpid wiki page git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@707443 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1335: moved Qman into java/management/clientArnaud Simon2008-10-0919-2386/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703177 13f79535-47bb-0310-9956-ffa450edef68
* This is a fix for QPID-1319.Rajith Muditha Attapattu2008-10-071-1/+17
| | | | | | | | | | If SSL is specified as an option in the ConnectionURL then it will be copied to the broker level options. If SSL is also specified in the broker URL then it will override the value given at the top level. I also added a simple test case for this use case. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@702488 13f79535-47bb-0310-9956-ffa450edef68
* qpid-1284: Qman unit testsArnaud Simon2008-09-2919-0/+2386
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@700134 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1208: fixed ConnectionURLTest to match the new behavior of ↵Rafael H. Schloming2008-08-291-1/+2
| | | | | | AMQConnectionURL.toString() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@690337 13f79535-47bb-0310-9956-ffa450edef68
* QPID-615: Merge rupertlssmiths 581293Aidan Skinner2008-08-121-0/+125
| | | | | | QPID-615, Added patched version of MINAs VM Pipe cleanup thread. Will replace once bug fix is in newer version of MINA. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685151 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1213: simplified unprocessed message and moved version specific code ↵Rafael H. Schloming2008-08-081-4/+4
| | | | | | into the _0_8 and _0_10 variants git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@684036 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1213: Patch from rgodfrey to refactor AbstractJMSMessage and ↵Rafael H. Schloming2008-08-073-19/+192
| | | | | | descendants to move AMQP version specific code into delegates and remove unnecessary conversion between 0-8 and 0-10 objects git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@683683 13f79535-47bb-0310-9956-ffa450edef68
* QPID-940,QPID-594,QPID-805,QPID-826 : Updated the client exception handling ↵Martin Ritchie2008-07-152-7/+34
| | | | | | | | | | | | | | | | | | | | | | so that exceptions are not lost. In performing the changes I noted that the AMQStateManager is only used for connection creation in the 08/09 codepath. Now this may be due to the fact that we don't currently need to wait on any other states. We need to improve our testing of error conditions for all protcol versions. Changes Summary: The MethodHandlers had their AMQStateManager parameters swapped for AMQSession as that is what they all cared about. The BlockingMethodFrameListener was used as a basis to create a generic BlockingWaiter which is now used by StateWaiter, There is probably scope to refactor the AMQStateManager and the parts of the AMQProtocolHandler that deal with the _frameListeners into a generic class but that can be looked at as part of a wider client refactor. Additionally tests were updated such as SimpleACLTest and ConnectionTest as they were expecting JMSExceptions from the constructor but the JMS API does not demand that and AMQExceptions are now correctly being thrown. The SimpleACLTest also required a change to AMQSession. The test calls send which will cause the connection to be closed asynchrously due to a permission violation. As this exception is not expected and is asynchorous to the client code it cannot be directly thrown. The solution is to record this exception in the AMQStateManager, it can tell that there are no waiters for the exception so it can record the value.(Potential exists to alert if the exception is overwritten but I don't think this is required right now) When the AMQSession checks that the connection is closed it is then possible to check if the current State is CLOSED and if we have an exception sitting in the AMQStateManager. If all these are true we can attach the AMQStateManager exception to the IllegalState Exception that is normally thrown when the Session is closed. This maintains JMS Compliance and allows us to discover the cause of the failure, SimpleACLTest was updated by removing the IllegalState catch section that was causing the test to silently fail. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676978 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1079 : Based on Code Review : Remvoed AutoCreateVMBroker code from ↵Martin Ritchie2008-07-1559-14474/+0
| | | | | | QpidTestCase. Removed VMTestCase and all references to it, it was only used in JUnit4 testSuite wrappers. Rather than move QpidTestCase to a new module all client tests have that require this class have been moved to systests. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676971 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1079 : Based on Code Review : Remvoed AutoCreateVMBroker code from ↵Martin Ritchie2008-07-1548-363/+51
| | | | | | QpidTestCase. Removed VMTestCase and all references to it, it was only used in JUnit4 testSuite wrappers. Rather than move QpidTestCase to a new module all client tests have that require this class have been moved to systests. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@676969 13f79535-47bb-0310-9956-ffa450edef68
* QPID-293 allow messages which have been received by the consumer before a ↵Aidan Skinner2008-07-081-4/+4
| | | | | | | | | | message listener has been set to be delivered. BasicMessageConsumer.java: If there are messages on the synchronous queue when a message listener is set, deliver them to it since they can no longer be consumed(). MessageListenerTest.java: Uncomment code that will make the test fail and demonstrate the bug git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674747 13f79535-47bb-0310-9956-ffa450edef68
* Qpid-940 - ConnectionTest#testPasswordFailureConnection fails occasionally ↵Martin Ritchie2008-07-041-25/+33
| | | | | | | | | | so while these race conditions are addressed I've converted the ConnectionTest to QpidTestCase and use it to skip the PasswordFailureConnection. junit.framework.AssertionFailedError: No cause set at org.apache.qpid.test.unit.client.connection.ConnectionTest.testPasswordFailureConnection(ConnectionTest.java:145) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674058 13f79535-47bb-0310-9956-ffa450edef68
* QPID-962 Exception handling was... unpleasing... Fix up of patch from rhsAidan Skinner2008-07-031-0/+1
| | | | | | | | | | | | | | | | AMQConnection.java: Refactor listener and stack exceptions in a list. Add get lastException, which can now be any Exception. Don't set connected, let the delegate decide. AMQConnectionDelegate_8_0.java, AMQConnectionDelete_0_10.java: set _connected to true if we suceed AMQProtocolHandler.java: attainState can now throw any sort of Exception AMQStateManager.java: attainState can now throw any Exception ConnectionTest.java: check that exception cause is not null AMQConnectionFailureException.java: Add ability to store a Collection of Exceptions in case there are multiple possible causes of the failure. Which there shouldn't be, but it can happen. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673688 13f79535-47bb-0310-9956-ffa450edef68