summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2012-02-06 00:14:39 +0000
committerRobert Gemmell <robbie@apache.org>2012-02-06 00:14:39 +0000
commitacc576ba965ea33f67f436e8107921de10924fb5 (patch)
tree01917bd582f722faa48de0943ef4f7fd4e31014b
parent1d5676c1c290f232931461ad318fe87d4a6b0c46 (diff)
downloadqpid-python-acc576ba965ea33f67f436e8107921de10924fb5.tar.gz
QPID-3815: update test to expose the issue, we no longer log both the (unsupported) 0-10 and subsequent 0-9-1 connection attempts on the 0-9-1 profiles, so the test can now expect a precise number of messages on every profile
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1240867 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java b/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
index 93a281be9b..2c1cebb9b3 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/logging/ConnectionLoggingTest.java
@@ -58,7 +58,7 @@ public class ConnectionLoggingTest extends AbstractTestLogging
// Wait until opened
waitForMessage("CON-1001");
- // Close the conneciton
+ // Close the connection
connection.close();
// Wait to ensure that the desired message is logged
@@ -66,18 +66,10 @@ public class ConnectionLoggingTest extends AbstractTestLogging
List<String> results = waitAndFindMatches("CON-1001");
- // Validation
- // We should have at least three messages when running InVM but when running External
- // we will get 0-10 negotiation on con:0 whcih may close at some random point
- // MESSAGE [con:0(/127.0.0.1:46926)] CON-1001 : Open
- // MESSAGE [con:0(/127.0.0.1:46926)] CON-1001 : Open : Protocol Version : 0-10
// MESSAGE [con:1(/127.0.0.1:46927)] CON-1001 : Open
// MESSAGE [con:1(/127.0.0.1:46927)] CON-1001 : Open : Protocol Version : 0-9
- // MESSAGE [con:0(/127.0.0.1:46926)] CON-1002 : Close
// MESSAGE [con:1(/127.0.0.1:46927)] CON-1001 : Open : Client ID : clientid : Protocol Version : 0-9
-
- //So check how many connections we have in the result set and extract the last one.
- // When running InVM we will have con:0 and externally con:1
+ // MESSAGE [con:0(/127.0.0.1:46927)] CON-1002 : Close
HashMap<Integer, List<String>> connectionData = splitResultsOnConnectionID(results);
@@ -87,26 +79,21 @@ public class ConnectionLoggingTest extends AbstractTestLogging
//Use just the data from the last connection for the test
results = connectionData.get(connectionID);
- // If we are running inVM or with 0-10 we will get three open messagse
- // if running externally with 0-8/0-9 we will also have open and close messages from the failed 0-10 negotiation
- assertTrue("CON messages not logged:" + results.size(), results.size() >= 3);
+ assertEquals("Unexpected CON-1001 messages count", 3, results.size());
String log = getLogMessage(results, 0);
// MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open
//1 & 2
validateMessageID("CON-1001",log);
- // validate the last three CON- messages.
- // This is because when running externally we may also have logged the failed
- // 0-10 negotiation messages if using 0-8/0-9 on the broker.
-
- // 3 - Assert the options are correct
+ // 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
validateConnectionOpen(results, 0, true, true, clientid);
// MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open : Protocol Version : 0-9
validateConnectionOpen(results, 1, true, false, null);
+ // MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open
validateConnectionOpen(results, 2, false, false, null);
}