You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/10/13 07:48:13 UTC

[camel] branch main updated: CAMEL-18608: Fix the tests in JmsDefaultTaskExecutorTypeTest

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

nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new c7ec996a6bc CAMEL-18608: Fix the tests in JmsDefaultTaskExecutorTypeTest
c7ec996a6bc is described below

commit c7ec996a6bc049d30512cd1afc1ab5bcef412381
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Thu Oct 13 09:47:48 2022 +0200

    CAMEL-18608: Fix the tests in JmsDefaultTaskExecutorTypeTest
---
 .../component/jms/JmsDefaultTaskExecutorTypeTest.java      | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDefaultTaskExecutorTypeTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDefaultTaskExecutorTypeTest.java
index 2939838c1b7..36747c62944 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDefaultTaskExecutorTypeTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsDefaultTaskExecutorTypeTest.java
@@ -50,7 +50,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
  */
 @Tags({ @Tag("not-parallel"), @Tag("slow") })
 @Timeout(60)
-public class JmsDefaultTaskExecutorTypeTest extends CamelTestSupport {
+class JmsDefaultTaskExecutorTypeTest extends CamelTestSupport {
     public static final int MESSAGE_COUNT = 500;
     public static final int POOL_SIZE = 5;
 
@@ -60,13 +60,13 @@ public class JmsDefaultTaskExecutorTypeTest extends CamelTestSupport {
     public ActiveMQService service = ActiveMQServiceFactory.createPersistentVMService();
 
     @Test
-    public void testThreadPoolTaskExecutor() throws Exception {
+    void testThreadPoolTaskExecutor() throws Exception {
         context.getRouteController().startRoute("threadPool");
         Long beforeThreadCount = currentThreadCount();
         getMockEndpoint("mock:result.threadPool").expectedMessageCount(1000);
         doSendMessages("foo.JmsDefaultTaskExecutorTypeTest.threadPool", DefaultTaskExecutorType.ThreadPool);
         doSendMessages("foo.JmsDefaultTaskExecutorTypeTest.threadPool", DefaultTaskExecutorType.ThreadPool);
-        MockEndpoint.assertIsSatisfied(context);
+        MockEndpoint.assertIsSatisfied(context, 40, TimeUnit.SECONDS);
         long numberThreadsCreated = currentThreadCount() - beforeThreadCount;
         LOG.info("Number of threads created, testThreadPoolTaskExecutor: {}", numberThreadsCreated);
         assertTrue(numberThreadsCreated <= 100, "Number of threads created should be equal or lower than "
@@ -74,7 +74,7 @@ public class JmsDefaultTaskExecutorTypeTest extends CamelTestSupport {
     }
 
     @Test
-    public void testSimpleAsyncTaskExecutor() throws Exception {
+    void testSimpleAsyncTaskExecutor() throws Exception {
         context.getRouteController().startRoute("simpleAsync");
         Long beforeThreadCount = currentThreadCount();
         getMockEndpoint("mock:result.simpleAsync").expectedMessageCount(1000);
@@ -88,13 +88,13 @@ public class JmsDefaultTaskExecutorTypeTest extends CamelTestSupport {
     }
 
     @Test
-    public void testDefaultTaskExecutor() throws Exception {
+    void testDefaultTaskExecutor() throws Exception {
         context.getRouteController().startRoute("default");
         Long beforeThreadCount = currentThreadCount();
         getMockEndpoint("mock:result.default").expectedMessageCount(1000);
         doSendMessages("foo.JmsDefaultTaskExecutorTypeTest.default", null);
         doSendMessages("foo.JmsDefaultTaskExecutorTypeTest.default", null);
-        MockEndpoint.assertIsSatisfied(context);
+        MockEndpoint.assertIsSatisfied(context, 40, TimeUnit.SECONDS);
         long numberThreadsCreated = currentThreadCount() - beforeThreadCount;
         LOG.info("Number of threads created, testDefaultTaskExecutor: {}", numberThreadsCreated);
         assertTrue(numberThreadsCreated >= 800, "Number of threads created should be equal or higher than "
@@ -102,7 +102,7 @@ public class JmsDefaultTaskExecutorTypeTest extends CamelTestSupport {
     }
 
     @Test
-    public void testDefaultTaskExecutorThreadPoolAtComponentConfig() throws Exception {
+    void testDefaultTaskExecutorThreadPoolAtComponentConfig() throws Exception {
         // change the config of the component
         context.getComponent("jms", JmsComponent.class).getConfiguration()
                 .setDefaultTaskExecutorType(DefaultTaskExecutorType.ThreadPool);