Repository: qpid-jms
Updated Branches:
  refs/heads/master 8aa05509f -> b64aebbd3


QPIDJMS-389: fix race in test and a c&p issue with logging


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

Branch: refs/heads/master
Commit: b64aebbd35d176755b4c2cc517148824c3079d21
Parents: 8aa0550
Author: Robbie Gemmell <[email protected]>
Authored: Sat Jun 9 00:46:56 2018 +0100
Committer: Robbie Gemmell <[email protected]>
Committed: Sat Jun 9 00:52:07 2018 +0100

----------------------------------------------------------------------
 .../qpid/jms/integration/ProducerIntegrationTest.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/b64aebbd/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
index 11c4c3e..584a00b 100644
--- 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
@@ -2887,12 +2887,12 @@ public class ProducerIntegrationTest extends 
QpidJmsTestCase {
             Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
             Queue queue = session.createQueue("myQueue");
 
-            MessageProducer producer = session.createProducer(queue);
             Message message = session.createTextMessage("content");
             message.setIntProperty("test", 1);
 
             assertNull("Should not yet have a JMSDestination", 
message.getJMSDestination());
 
+            MessageProducer producer = session.createProducer(queue);
             testPeer.waitForAllHandlersToComplete(100);
 
             assertTrue("Producer should have been closed", 
producerClosed.await(2, TimeUnit.SECONDS));
@@ -2900,9 +2900,9 @@ public class ProducerIntegrationTest extends 
QpidJmsTestCase {
             TestJmsCompletionListener listener = new 
TestJmsCompletionListener();
             try {
                 producer.send(message, listener);
-                fail("No expected exception for this send.");
+                fail("Expected exception to be thrown for this send.");
             } catch (JMSException e) {
-                LOG.warn("Caught unexpected error: {}", e.getMessage());
+                LOG.trace("Caught expected exception: {}", e.getMessage());
             }
 
             assertFalse("Should not get async callback", 
listener.awaitCompletion(5, TimeUnit.MILLISECONDS));
@@ -2941,12 +2941,12 @@ public class ProducerIntegrationTest extends 
QpidJmsTestCase {
             Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
             Queue queue = session.createQueue("myQueue");
 
-            MessageProducer producer = session.createProducer(queue);
             Message message = session.createTextMessage("content");
             message.setIntProperty("test", 1);
 
             assertNull("Should not yet have a JMSDestination", 
message.getJMSDestination());
 
+            MessageProducer producer = session.createProducer(queue);
             testPeer.waitForAllHandlersToComplete(100);
 
             assertTrue("Session should have been closed", 
sessionClosed.await(2, TimeUnit.SECONDS));
@@ -2954,9 +2954,9 @@ public class ProducerIntegrationTest extends 
QpidJmsTestCase {
             TestJmsCompletionListener listener = new 
TestJmsCompletionListener();
             try {
                 producer.send(message, listener);
-                fail("No expected exception for this send.");
+                fail("Expected exception to be thrown for this send.");
             } catch (JMSException e) {
-                LOG.warn("Caught unexpected error: {}", e.getMessage());
+                LOG.trace("Caught expected exception: {}", e.getMessage());
             }
 
             assertFalse("Should not get async callback", 
listener.awaitCompletion(5, TimeUnit.MILLISECONDS));


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to