diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2012-02-27 23:43:02 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2012-02-27 23:43:02 +0000 |
| commit | 6e147e4d0e8bd2a2fe5ec54c74b2a27c7bd67daa (patch) | |
| tree | ba16071260a8e9f4adee079290ba89e83f1360d5 /java/systests | |
| parent | 2fb2ccb0b45e5b5ab62705570fa18f72eec1ffd5 (diff) | |
| download | qpid-python-6e147e4d0e8bd2a2fe5ec54c74b2a27c7bd67daa.tar.gz | |
QPID-2621 : [Java Client] Calling QueueBrowser.getEnumeration on a stopped connection will hang
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1294397 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java b/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java index f3433adb3f..6b6b4a7b3c 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java @@ -420,4 +420,21 @@ public class QueueBrowserAutoAckTest extends QpidBrokerTestCase validate(messages); } + public void testBrowsingWhileStopped() throws JMSException + { + _clientConnection.stop(); + + try + { + QueueBrowser browser = _clientSession.createBrowser(getTestQueue()); + Enumeration messages = browser.getEnumeration(); + fail("Expected exception when attempting to browse on a stopped connection did not occur"); + } + catch(javax.jms.IllegalStateException e) + { + // pass + } + + } + } |
