summaryrefslogtreecommitdiff
path: root/java/systests/src/test
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-01-26 16:48:51 +0000
committerRafael H. Schloming <rhs@apache.org>2007-01-26 16:48:51 +0000
commit4437ede734dec42908112ef41e14a2c86a9d98c7 (patch)
tree4ce76bf672c346e51cf22697c1f06f492cd5a5aa /java/systests/src/test
parent1e9323d2d2ba0228e550a1cec08268171354b55f (diff)
downloadqpid-python-4437ede734dec42908112ef41e14a2c86a9d98c7.tar.gz
Modified the protocol session to create channel zero by default. Updated the AMQProtocolSessionMBeanTest accordingly
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@500282 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src/test')
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/java/systests/src/test/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java b/java/systests/src/test/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
index b4372049dd..f84f14f28d 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBeanTest.java
@@ -50,10 +50,10 @@ public class AMQProtocolSessionMBeanTest extends TestCase
{
// check the channel count is correct
int channelCount = _mbean.channels().size();
- assertTrue(channelCount == 1);
+ assertTrue(channelCount == 2);
_protocolSession.addChannel(new AMQChannel(2,_protocolSession, _messageStore, null,null));
channelCount = _mbean.channels().size();
- assertTrue(channelCount == 2);
+ assertTrue(channelCount == 3);
// general properties test
_mbean.setMaximumNumberOfChannels(1000L);
@@ -82,15 +82,15 @@ public class AMQProtocolSessionMBeanTest extends TestCase
// check if closing of session works
_protocolSession.addChannel(new AMQChannel(5,_protocolSession, _messageStore, null,null));
_mbean.closeConnection();
+ channelCount = _mbean.channels().size();
+ assertTrue(channelCount == 0);
try
{
- channelCount = _mbean.channels().size();
- assertTrue(channelCount == 0);
- // session is now closed so adding another channel should throw an exception
- _protocolSession.addChannel(new AMQChannel(6,_protocolSession, _messageStore, null,null));
- fail();
+ // session is now closed so adding another channel should throw an exception
+ _protocolSession.addChannel(new AMQChannel(6,_protocolSession, _messageStore, null,null));
+ fail();
}
- catch(OpenDataException ex)
+ catch(IllegalStateException ex)
{
System.out.println("expected exception is thrown :" + ex.getMessage());
}