You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2021/04/26 16:55:11 UTC

[camel-kafka-connector] branch main updated: Return ealier from SJMS test to avoid locking the test

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git


The following commit(s) were added to refs/heads/main by this push:
     new 84d851b  Return ealier from SJMS test to avoid locking the test
84d851b is described below

commit 84d851b5eb076774496438dc4853936e844bc751
Author: Otavio Rodolfo Piske <op...@redhat.com>
AuthorDate: Mon Apr 26 16:21:32 2021 +0200

    Return ealier from SJMS test to avoid locking the test
---
 .../apache/camel/kafkaconnector/sjms2/sink/CamelSinkJMSITCase.java   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/itests-sjms2/src/test/java/org/apache/camel/kafkaconnector/sjms2/sink/CamelSinkJMSITCase.java b/tests/itests-sjms2/src/test/java/org/apache/camel/kafkaconnector/sjms2/sink/CamelSinkJMSITCase.java
index b56c580..0787f8c 100644
--- a/tests/itests-sjms2/src/test/java/org/apache/camel/kafkaconnector/sjms2/sink/CamelSinkJMSITCase.java
+++ b/tests/itests-sjms2/src/test/java/org/apache/camel/kafkaconnector/sjms2/sink/CamelSinkJMSITCase.java
@@ -99,6 +99,7 @@ public class CamelSinkJMSITCase extends CamelSinkTestSupport {
                 received++;
 
                 if (received == expect) {
+                    LOG.debug("All messages were received");
                     return false;
                 }
 
@@ -121,9 +122,7 @@ public class CamelSinkJMSITCase extends CamelSinkTestSupport {
 
             jmsClient.start();
             try (MessageConsumer consumer = jmsClient.createConsumer(SJMS2Common.DEFAULT_JMS_QUEUE)) {
-                for (int i = 0; i < expect; i++) {
-                    jmsClient.receive(consumer, this::checkRecord);
-                }
+                jmsClient.receive(consumer, this::checkRecord);
             }
 
         } catch (Exception e) {