You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "kulagaIA (via GitHub)" <gi...@apache.org> on 2023/12/22 15:34:57 UTC

[PR] CAMEL-20276 fixing jms shared topic tests [camel]

kulagaIA opened a new pull request, #12580:
URL: https://github.com/apache/camel/pull/12580

   # Description
    it seems that sometimes publication happens before artemis finishes creating consumers
   
   # Tracking
   https://issues.apache.org/jira/browse/CAMEL-20276


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske merged PR #12580:
URL: https://github.com/apache/camel/pull/12580


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "kulagaIA (via GitHub)" <gi...@apache.org>.
kulagaIA commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1867822060

   /component-test camel-jms


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1868527284

   :robot: The Apache Camel test robot will run the tests for you :+1:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1867821197

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions to run
   
   * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "kulagaIA (via GitHub)" <gi...@apache.org>.
kulagaIA commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1868551843

   > LGTM, thanks.
   
   Thanks for pointing out that i need to wait for the context to be up, instead of just noop!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1867822517

   :robot: The Apache Camel test robot will run the tests for you :+1:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1867843563

   :robot: The Apache Camel test robot will run the tests for you :+1:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "kulagaIA (via GitHub)" <gi...@apache.org>.
kulagaIA commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1868527172

   /component-test camel-jms


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "kulagaIA (via GitHub)" <gi...@apache.org>.
kulagaIA commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1867877504

   One thing that probably could be done is polling artemis for the state of consumers, instead of just waiting. If it is needed i can dig into it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "kulagaIA (via GitHub)" <gi...@apache.org>.
kulagaIA commented on code in PR #12580:
URL: https://github.com/apache/camel/pull/12580#discussion_r1435632013


##########
components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTopicDurableSharedTest.java:
##########
@@ -42,6 +43,7 @@ void testDurableSharedTopic() throws Exception {
         mock2.expectedMessageCount(1);
         mock2.expectedBodiesReceived("Hello World");
 
+        artemisConsumersWereCreated.await(1000, TimeUnit.MILLISECONDS);

Review Comment:
   Yeah its the same as Thread.sleep if we dont poll artemis for the state of the consumers. Ok, I'll revert



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "kulagaIA (via GitHub)" <gi...@apache.org>.
kulagaIA commented on PR #12580:
URL: https://github.com/apache/camel/pull/12580#issuecomment-1867843174

   /component-test camel-jms


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on code in PR #12580:
URL: https://github.com/apache/camel/pull/12580#discussion_r1435595755


##########
components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTopicDurableSharedTest.java:
##########
@@ -18,18 +18,19 @@
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Tags;
 import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 @Tags({ @Tag("not-parallel") })
-@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Flaky on GitHub Actions")
-@Disabled("Disabled due to CAMEL-20276")
 public class JmsTopicDurableSharedTest extends AbstractPersistentJMSTest {
 
-    private static final String TEST_DESTINATION_NAME = "activemq:topic:in.only.topic.consumer.test";
+    private static final String TEST_DESTINATION_NAME = "activemq:topic:in.only.topic.shared.durable.test";
+
+    private CountDownLatch artemisConsumersWereCreated = new CountDownLatch(1);

Review Comment:
   Where are you counting down the latch? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-20276 fixing jms shared topic tests [camel]

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on code in PR #12580:
URL: https://github.com/apache/camel/pull/12580#discussion_r1435596079


##########
components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTopicDurableSharedTest.java:
##########
@@ -42,6 +43,7 @@ void testDurableSharedTopic() throws Exception {
         mock2.expectedMessageCount(1);
         mock2.expectedBodiesReceived("Hello World");
 
+        artemisConsumersWereCreated.await(1000, TimeUnit.MILLISECONDS);

Review Comment:
   This latch is noop, as it is just timing out and it's not an adequate use of a latch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org