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 2022/06/28 11:18:20 UTC
[camel] 02/02: (chores) camel-jms: convert multiple executions to ParameterizedTest
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.git
commit 6721f9bd3a3df2f22cca38d13dad5e77e684e24a
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 28 12:21:40 2022 +0200
(chores) camel-jms: convert multiple executions to ParameterizedTest
---
.../jms/JmsRequestReplyTempQueueMultipleConsumersTest.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyTempQueueMultipleConsumersTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyTempQueueMultipleConsumersTest.java
index c6ff06bee32..2cd18ea62dc 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyTempQueueMultipleConsumersTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRequestReplyTempQueueMultipleConsumersTest.java
@@ -29,6 +29,8 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
import static org.apache.camel.test.junit5.TestSupport.body;
@@ -55,17 +57,13 @@ public class JmsRequestReplyTempQueueMultipleConsumersTest extends CamelTestSupp
context.getExecutorServiceManager().shutdown(executorService);
}
- @Test
- public void testTempQueueRefreshed() throws Exception {
+ @ParameterizedTest
+ @ValueSource(ints = { 500, 100, 100 })
+ public void testTempQueueRefreshed(int numFiles) throws Exception {
executorService = context.getExecutorServiceManager().newFixedThreadPool(this, "test", 5);
- doSendMessages(100);
- connectionFactory.clear();
- Thread.sleep(1000);
- doSendMessages(100);
+ doSendMessages(numFiles);
connectionFactory.clear();
- Thread.sleep(1000);
- doSendMessages(100);
context.getExecutorServiceManager().shutdown(executorService);
}