summaryrefslogtreecommitdiff
path: root/qpid/java/systests/src
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2013-10-27 17:09:42 +0000
committerRobert Gemmell <robbie@apache.org>2013-10-27 17:09:42 +0000
commit62adcf960b84eae15c5947f40c7913581472fe52 (patch)
tree93c32abcd34b6259fae8291daa55282494554fb8 /qpid/java/systests/src
parent76666e50981b92b60197d9a51c7fff62e38fb98e (diff)
downloadqpid-python-62adcf960b84eae15c5947f40c7913581472fe52.tar.gz
QPID-5266: include the client product string in connection open log message
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536163 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests/src')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
index ffe25a5cbe..2eccab102b 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
@@ -90,18 +90,19 @@ public class ConnectionLoggingTest extends AbstractTestLogging
validateMessageID("CON-1001",log);
// validate the last three CON-1001 messages.
- // MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open : Client ID : clientid : Protocol Version : 0-9 : Client Version : 1.2.3_4
- validateConnectionOpen(results, 0, true, true, clientid, true, QpidProperties.getReleaseVersion());
+ // MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open : Client ID : clientid : Protocol Version : 0-9 : Client Version : 1.2.3_4 : Client Product : product
+ validateConnectionOpen(results, 0, true, true, clientid, true, QpidProperties.getReleaseVersion(), true, QpidProperties.getProductName());
// MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open : Protocol Version : 0-9
- validateConnectionOpen(results, 1, true, false, null, false, null);
+ validateConnectionOpen(results, 1, true, false, null, false, null, false, null);
// MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open
- validateConnectionOpen(results, 2, false, false, null, false, null);
+ validateConnectionOpen(results, 2, false, false, null, false, null, false, null);
}
private void validateConnectionOpen(List<String> results, int positionFromEnd,
- boolean protocolVersionPresent, boolean clientIdOptionPresent, String clientIdValue, boolean clientVersionPresent, String clientVersionValue)
+ boolean protocolVersionPresent, boolean clientIdOptionPresent, String clientIdValue,
+ boolean clientVersionPresent, String clientVersionValue, boolean clientProductPresent, String clientProductValue)
{
String log = getLogMessageFromEnd(results, positionFromEnd);
@@ -119,12 +120,19 @@ public class ConnectionLoggingTest extends AbstractTestLogging
//fixme there is no way currently to find out the negotiated protocol version
// The delegate is the versioned class ((AMQConnection)connection)._delegate
- assertEquals("unexpected Client ID option state", clientVersionPresent, fromMessage(log).contains("Client Version :"));
+ assertEquals("unexpected Client Version option state", clientVersionPresent, fromMessage(log).contains("Client Version :"));
if(clientVersionPresent && clientVersionValue != null)
{
assertTrue("Client version value is not present: " + clientVersionValue, fromMessage(log).contains(clientVersionValue));
}
+
+ assertEquals("unexpected Client Product option state", clientVersionPresent, fromMessage(log).contains("Client Product :"));
+
+ if(clientProductPresent && clientProductValue != null)
+ {
+ assertTrue("Client product value is not present: " + clientProductValue, fromMessage(log).contains(clientProductValue));
+ }
}
/**