summaryrefslogtreecommitdiff
path: root/java/systests/src
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-02-05 20:55:38 +0000
committerRobert Gemmell <robbie@apache.org>2012-02-05 20:55:38 +0000
commit7b189df7fbc75216eaacc7d372bf3052a5710f5c (patch)
tree69476c7066801b57c6d1875daac600579c189df4 /java/systests/src
parent315a7622924f4303d120ac33ccef23ef6cdf0041 (diff)
downloadqpid-python-7b189df7fbc75216eaacc7d372bf3052a5710f5c.tar.gz
QPID-3814: ensure the 0-10 client sends its version number during ConnectionStart(Ok) process, align properties better across protocol versions, general tidy up of the property handling
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1240813 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/management/jmx/ManagedConnectionMBeanTest.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagedConnectionMBeanTest.java b/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagedConnectionMBeanTest.java
index 6a8125fd04..3fc370dc68 100644
--- a/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagedConnectionMBeanTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagedConnectionMBeanTest.java
@@ -22,6 +22,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.qpid.client.AMQSession;
+import org.apache.qpid.common.QpidProperties;
import org.apache.qpid.management.common.mbeans.ManagedConnection;
import org.apache.qpid.test.utils.JMXTestUtils;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
@@ -242,4 +243,36 @@ public class ManagedConnectionMBeanTest extends QpidBrokerTestCase
assertNotNull("Connection MBean is null", mBean);
assertEquals("Unexpected authorized id", "guest", mBean.getAuthorizedId());
}
+
+ public void testClientVersion() throws Exception
+ {
+ List<ManagedConnection> connections = _jmxUtils.getManagedConnections("test");
+ assertNotNull("Connection MBean is not found", connections);
+ assertEquals("Unexpected number of connection mbeans", 1, connections.size());
+ final ManagedConnection mBean = connections.get(0);
+ assertNotNull("Connection MBean is null", mBean);
+
+ String expectedVersion = QpidProperties.getReleaseVersion();
+ assertNotNull("version should not be null", expectedVersion);
+ assertFalse("version should not be the empty string", expectedVersion.equals(""));
+ assertFalse("version should not be the string 'null'", expectedVersion.equals("null"));
+
+ assertEquals("Unexpected version", expectedVersion, mBean.getVersion());
+ }
+
+ public void testClientId() throws Exception
+ {
+ List<ManagedConnection> connections = _jmxUtils.getManagedConnections("test");
+ assertNotNull("Connection MBean is not found", connections);
+ assertEquals("Unexpected number of connection mbeans", 1, connections.size());
+ final ManagedConnection mBean = connections.get(0);
+ assertNotNull("Connection MBean is null", mBean);
+
+ String expectedClientId = _connection.getClientID();
+ assertNotNull("ClientId should not be null", expectedClientId);
+ assertFalse("ClientId should not be the empty string", expectedClientId.equals(""));
+ assertFalse("ClientId should not be the string 'null'", expectedClientId.equals("null"));
+
+ assertEquals("Unexpected ClientId", expectedClientId, mBean.getClientId());
+ }
}