You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2017/06/22 20:53:16 UTC

qpid-interop-test git commit: QPIDIT-82: JMS tests fail intermittantly with null message

Repository: qpid-interop-test
Updated Branches:
  refs/heads/master 932552dc1 -> d300ca456


QPIDIT-82: JMS tests fail intermittantly with null message


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

Branch: refs/heads/master
Commit: d300ca4569515f265230f309ced7b5bbb920aac3
Parents: 932552d
Author: Kim van der Riet <kp...@apache.org>
Authored: Thu Jun 22 16:52:50 2017 -0400
Committer: Kim van der Riet <kp...@apache.org>
Committed: Thu Jun 22 16:52:50 2017 -0400

----------------------------------------------------------------------
 .../qpid/qpid_interop_test/jms_hdrs_props_test/Receiver.java | 8 +++++---
 .../qpid/qpid_interop_test/jms_messages_test/Receiver.java   | 6 ++++--
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/d300ca45/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_hdrs_props_test/Receiver.java
----------------------------------------------------------------------
diff --git a/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_hdrs_props_test/Receiver.java b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_hdrs_props_test/Receiver.java
index 8dc083a..00d2e4c 100644
--- a/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_hdrs_props_test/Receiver.java
+++ b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_hdrs_props_test/Receiver.java
@@ -55,7 +55,7 @@ import org.apache.qpid.jms.JmsConnectionFactory;
 public class Receiver {
     private static final String USER = "guest";
     private static final String PASSWORD = "guest";
-    private static final int TIMEOUT = 1000;
+    private static final int TIMEOUT = 10000;
     private static final String[] SUPPORTED_JMS_MESSAGE_TYPES = {"JMS_MESSAGE_TYPE",
                                                                  "JMS_BYTESMESSAGE_TYPE",
                                                                  "JMS_MAPMESSAGE_TYPE",
@@ -143,7 +143,9 @@ public class Receiver {
                 JsonArrayBuilder jasonTestValuesArrayBuilder = Json.createArrayBuilder();
                 for (int i=0; i<numTestValuesMap.getJsonNumber(subType).intValue(); ++i) {
                     message = _messageConsumer.receive(TIMEOUT);
-                    if (message == null) break;
+                    if (message == null) {
+                        throw new Exception("Receiver::run(): No message, timeout while waiting");
+                     }
                     switch (jmsMessageType) {
                     case "JMS_MESSAGE_TYPE":
                         processJMSMessage(jasonTestValuesArrayBuilder);
@@ -192,7 +194,7 @@ public class Receiver {
     }
     
     protected void processJMSMessage(JsonArrayBuilder jasonTestValuesArrayBuilder) {
-        jasonTestValuesArrayBuilder.addNull();        
+        jasonTestValuesArrayBuilder.addNull();
     }
     
     protected void processJMSBytesMessage(String jmsMessageType, String subType, Message message, JsonArrayBuilder jasonTestValuesArrayBuilder) throws Exception, JMSException, IOException, ClassNotFoundException {

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/d300ca45/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_messages_test/Receiver.java
----------------------------------------------------------------------
diff --git a/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_messages_test/Receiver.java b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_messages_test/Receiver.java
index 46b6baf..07d1f06 100644
--- a/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_messages_test/Receiver.java
+++ b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/jms_messages_test/Receiver.java
@@ -53,7 +53,7 @@ import org.apache.qpid.jms.JmsConnectionFactory;
 public class Receiver {
     private static final String USER = "guest";
     private static final String PASSWORD = "guest";
-    private static final int TIMEOUT = 1000;
+    private static final int TIMEOUT = 10000;
     private static final String[] SUPPORTED_JMS_MESSAGE_TYPES = {"JMS_MESSAGE_TYPE",
                                                                  "JMS_BYTESMESSAGE_TYPE",
                                                                  "JMS_MAPMESSAGE_TYPE",
@@ -129,7 +129,9 @@ public class Receiver {
                 JsonArrayBuilder jasonTestValuesArrayBuilder = Json.createArrayBuilder();
                 for (int i=0; i<numTestValuesMap.getJsonNumber(subType).intValue(); ++i) {
                     message = _messageConsumer.receive(TIMEOUT);
-                    if (message == null) break;
+                    if (message == null) {
+                        throw new Exception("Receiver::run(): No message, timeout while waiting");
+                    }
                     switch (jmsMessageType) {
                     case "JMS_MESSAGE_TYPE":
                         processJMSMessage(jasonTestValuesArrayBuilder);


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