qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject qpid-jms git commit: NO-JIRA Clean up some tests so that connections get closed, reduces errors logged in the test output.
Date Mon, 28 Mar 2016 21:25:35 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master d96150771 -> c7624e8ef


NO-JIRA Clean up some tests so that connections get closed, reduces
errors logged in the test output.  

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/c7624e8e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/c7624e8e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/c7624e8e

Branch: refs/heads/master
Commit: c7624e8ef9f709d1f9a662b6e2de40f277a3bd3d
Parents: d961507
Author: Timothy Bish <tabish121@gmail.com>
Authored: Mon Mar 28 17:25:26 2016 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Mon Mar 28 17:25:26 2016 -0400

----------------------------------------------------------------------
 .../AmqpAcknowledgementsIntegrationTest.java    |  6 ++++
 .../BytesMessageIntegrationTest.java            | 16 +++++++++
 .../integration/ConnectionIntegrationTest.java  | 12 +++++++
 .../integration/ConsumerIntegrationTest.java    | 36 ++++++++++++++++++++
 4 files changed, 70 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c7624e8e/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/AmqpAcknowledgementsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/AmqpAcknowledgementsIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/AmqpAcknowledgementsIntegrationTest.java
index e6d557d..3a212df 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/AmqpAcknowledgementsIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/AmqpAcknowledgementsIntegrationTest.java
@@ -119,6 +119,9 @@ public class AmqpAcknowledgementsIntegrationTest extends QpidJmsTestCase
{
 
             lastReceivedMessage.acknowledge();
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(3000);
         }
     }
@@ -200,6 +203,9 @@ public class AmqpAcknowledgementsIntegrationTest extends QpidJmsTestCase
{
 
             lastReceivedMessage.get().acknowledge();
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(3000);
         }
     }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c7624e8e/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/BytesMessageIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/BytesMessageIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/BytesMessageIntegrationTest.java
index 5df5e93..f9188c5 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/BytesMessageIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/BytesMessageIntegrationTest.java
@@ -87,6 +87,11 @@ public class BytesMessageIntegrationTest extends QpidJmsTestCase {
             message.writeBytes(content);
 
             producer.send(message);
+
+            testPeer.expectClose();
+            connection.close();
+
+            testPeer.waitForAllHandlersToComplete(3000);
         }
     }
 
@@ -148,6 +153,11 @@ public class BytesMessageIntegrationTest extends QpidJmsTestCase {
             int readBytes = bytesMessage.readBytes(recievedContent);
             assertEquals(recievedContent.length, readBytes);
             assertTrue(Arrays.equals(expectedContent, recievedContent));
+
+            testPeer.expectClose();
+            connection.close();
+
+            testPeer.waitForAllHandlersToComplete(3000);
         }
     }
 
@@ -257,6 +267,9 @@ public class BytesMessageIntegrationTest extends QpidJmsTestCase {
 
             producer.send(receivedBytesMessage);
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(3000);
         }
     }
@@ -364,6 +377,9 @@ public class BytesMessageIntegrationTest extends QpidJmsTestCase {
 
             producer.send(receivedBytesMessage);
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(3000);
         }
     }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c7624e8e/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
index d56bb62..f93dcbd 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConnectionIntegrationTest.java
@@ -98,6 +98,8 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase {
             testPeer.expectBegin();
             Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             assertNotNull("Session should not be null", session);
+            testPeer.expectClose();
+            connection.close();
         }
     }
 
@@ -117,9 +119,13 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase {
             // reply with a declared disposition state containing the txnId.
             Binary txnId = new Binary(new byte[]{ (byte) 1, (byte) 2, (byte) 3, (byte) 4});
             testPeer.expectDeclare(txnId);
+            testPeer.expectDischarge(txnId, true);
+            testPeer.expectClose();
 
             Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
             assertNotNull("Session should not be null", session);
+
+            connection.close();
         }
     }
 
@@ -144,6 +150,9 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase {
                 // Expected
             }
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(1000);
         }
     }
@@ -200,6 +209,9 @@ public class ConnectionIntegrationTest extends QpidJmsTestCase {
             int result = meta.getProviderMajorVersion() + meta.getProviderMinorVersion();
             assertTrue("Expected non-zero provider major / minor version", result != 0);
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(1000);
         }
     }

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c7624e8e/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
index 762f345..33a8806 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ConsumerIntegrationTest.java
@@ -190,6 +190,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
 
             assertNotNull("A message should have been recieved", receivedMessage);
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(2000);
         }
     }
@@ -226,6 +229,11 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             });
 
             testPeer.waitForAllHandlersToComplete(2000);
+
+            testPeer.expectClose();
+            connection.close();
+
+            testPeer.waitForAllHandlersToComplete(2000);
         }
     }
 
@@ -261,6 +269,11 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             });
 
             testPeer.waitForAllHandlersToComplete(2000);
+
+            testPeer.expectClose();
+            connection.close();
+
+            testPeer.waitForAllHandlersToComplete(2000);
         }
     }
 
@@ -440,6 +453,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             testPeer.expectDetach(true, true, true);
             consumer.close();
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(2000);
         }
     }
@@ -474,6 +490,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             assertTrue(incoming.await(10, TimeUnit.SECONDS));
             assertNull(consumer.receive(100));
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(2000);
         }
     }
@@ -519,6 +538,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             } catch (JMSException ex) {
             }
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(2000);
         }
     }
@@ -551,6 +573,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             } catch (JMSException ex) {
             }
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(2000);
         }
     }
@@ -602,6 +627,11 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
             });
 
             testPeer.waitForAllHandlersToComplete(2000);
+
+            testPeer.expectClose();
+            connection.close();
+
+            testPeer.waitForAllHandlersToComplete(2000);
         }
     }
 
@@ -670,6 +700,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
 
             consumer.close();
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(3000);
         }
     }
@@ -723,6 +756,9 @@ public class ConsumerIntegrationTest extends QpidJmsTestCase {
 
             consumer.close();
 
+            testPeer.expectClose();
+            connection.close();
+
             testPeer.waitForAllHandlersToComplete(3000);
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message