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 711427b618a83dc21cf5ae6f9c4de278e191d82c Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Tue Mar 8 14:41:07 2022 +0100 CAMEL-17763: cleaned up unused exceptions in camel-aws2-sqs --- .../aws2/sqs/SqsBatchConsumerConcurrentConsumersTest.java | 6 +++--- .../org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java | 6 +++--- .../camel/component/aws2/sqs/SqsComponentClientRegistryTest.java | 2 +- .../camel/component/aws2/sqs/SqsComponentConfigurationTest.java | 6 +++--- .../apache/camel/component/aws2/sqs/SqsComponentSpringTest.java | 8 ++++---- .../org/apache/camel/component/aws2/sqs/SqsComponentTest.java | 8 ++++---- .../component/aws2/sqs/SqsComponentVerifierExtensionTest.java | 6 +++--- .../camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java | 4 ++-- .../component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java | 4 ++-- .../org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java | 6 +++--- .../camel/component/aws2/sqs/SqsProducerDeleteQueueTest.java | 6 +++--- .../apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java | 6 +++--- .../camel/component/aws2/sqs/SqsProducerListQueuesTest.java | 6 +++--- .../org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java | 6 +++--- .../component/aws2/sqs/integration/SqsComponentLocalstackIT.java | 8 ++++---- .../aws2/sqs/integration/SqsConsumerMessageLocalstackIT.java | 8 ++++---- .../integration/SqsDeadletterWithClientRegistryLocalstackIT.java | 6 +++--- .../sqs/integration/SqsProducerAutoCreateQueueLocalstackIT.java | 6 +++--- .../sqs/integration/SqsProducerBatchSendFifoLocalstackIT.java | 6 +++--- .../aws2/sqs/integration/SqsProducerBatchSendLocalstackIT.java | 6 +++--- .../SqsProducerBatchSendWithSeparatorLocalstackIT.java | 6 +++--- .../sqs/integration/SqsProducerDeleteMessageLocalstackIT.java | 6 +++--- .../sqs/integration/SqsProducerSendLocalstackMaxAttributesIT.java | 6 +++--- 23 files changed, 69 insertions(+), 69 deletions(-) diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerConcurrentConsumersTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerConcurrentConsumersTest.java index 172314d..cecf52e 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerConcurrentConsumersTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerConcurrentConsumersTest.java @@ -36,7 +36,7 @@ public class SqsBatchConsumerConcurrentConsumersTest extends CamelTestSupport { } @BindToRegistry("amazonSQSClient") - public AmazonSQSClientMock addClient() throws Exception { + public AmazonSQSClientMock addClient() { AmazonSQSClientMock clientMock = new AmazonSQSClientMock(); // add 6 messages, one more we will poll @@ -54,10 +54,10 @@ public class SqsBatchConsumerConcurrentConsumersTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("aws2-sqs://MyQueue?amazonSQSClient=#amazonSQSClient&delay=5000&maxMessagesPerPoll=5&concurrentConsumers=2") .to("mock:result"); } diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java index b478e3d..1fc5f25 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java @@ -50,7 +50,7 @@ public class SqsBatchConsumerTest extends CamelTestSupport { } @BindToRegistry("amazonSQSClient") - public AmazonSQSClientMock addClient() throws Exception { + public AmazonSQSClientMock addClient() { AmazonSQSClientMock clientMock = new AmazonSQSClientMock(); // add 6 messages, one more we will poll @@ -68,10 +68,10 @@ public class SqsBatchConsumerTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("aws2-sqs://MyQueue?amazonSQSClient=#amazonSQSClient&delay=5000&maxMessagesPerPoll=5").to("mock:result"); } }; diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java index 8f606b6..f53522e 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java @@ -37,7 +37,7 @@ public class SqsComponentClientRegistryTest extends CamelTestSupport { } @Test - public void createEndpointWithMinimalSQSClientMisconfiguration() throws Exception { + public void createEndpointWithMinimalSQSClientMisconfiguration() { Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class); assertThrows(IllegalArgumentException.class, () -> { diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java index f7b7c6c..9f95727 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java @@ -210,7 +210,7 @@ public class SqsComponentConfigurationTest extends CamelTestSupport { } @Test - public void createEndpointWithoutAccessKeyConfiguration() throws Exception { + public void createEndpointWithoutAccessKeyConfiguration() { Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class); assertThrows(IllegalArgumentException.class, () -> { component.createEndpoint("aws2-sqs://MyQueue?secretKey=yyy"); @@ -218,7 +218,7 @@ public class SqsComponentConfigurationTest extends CamelTestSupport { } @Test - public void createEndpointWithoutSecretKeyConfiguration() throws Exception { + public void createEndpointWithoutSecretKeyConfiguration() { Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class); assertThrows(IllegalArgumentException.class, () -> { component.createEndpoint("aws2-sqs://MyQueue?accessKey=xxx"); @@ -228,7 +228,7 @@ public class SqsComponentConfigurationTest extends CamelTestSupport { // Setting extendMessageVisibility on an SQS consumer should make // visibilityTimeout compulsory @Test - public void createEndpointWithExtendMessageVisibilityAndNoVisibilityTimeoutThrowsException() throws Exception { + public void createEndpointWithExtendMessageVisibilityAndNoVisibilityTimeoutThrowsException() { Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class); assertThrows(IllegalArgumentException.class, () -> { component.createEndpoint("aws2-sqs://MyQueue?accessKey=xxx&secretKey=yyy&extendMessageVisibility=true"); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java index c582d90..6db39ff 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java @@ -47,7 +47,7 @@ public class SqsComponentSpringTest extends CamelSpringTestSupport { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("This is my message text."); } }); @@ -71,7 +71,7 @@ public class SqsComponentSpringTest extends CamelSpringTestSupport { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOut, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("This is my message text."); } }); @@ -97,7 +97,7 @@ public class SqsComponentSpringTest extends CamelSpringTestSupport { template.send("direct:start-batch", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Collection c = new ArrayList<Integer>(); c.add("team1"); c.add("team2"); @@ -119,7 +119,7 @@ public class SqsComponentSpringTest extends CamelSpringTestSupport { template.send("direct:start-delete", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Sqs2Constants.RECEIPT_HANDLE, "123456"); } }); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java index ca6b6b7..251a212 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java @@ -46,7 +46,7 @@ public class SqsComponentTest extends CamelTestSupport { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("This is my message text."); } }); @@ -71,7 +71,7 @@ public class SqsComponentTest extends CamelTestSupport { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOut, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("This is my message text."); } }); @@ -92,7 +92,7 @@ public class SqsComponentTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { final String sqsURI = String.format( "aws2-sqs://MyQueue?amazonSQSClient=#amazonSQSClient&messageRetentionPeriod=%s&maximumMessageSize=%s&policy=%s", @@ -100,7 +100,7 @@ public class SqsComponentTest extends CamelTestSupport { ""); @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to(sqsURI); from(sqsURI).to("mock:result"); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java index 2ae40a0..535b1e3 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java @@ -37,7 +37,7 @@ public class SqsComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testParameters() throws Exception { + public void testParameters() { Component component = context().getComponent("aws2-sqs"); ComponentVerifierExtension verifier @@ -55,7 +55,7 @@ public class SqsComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testConnectivity() throws Exception { + public void testConnectivity() { Component component = context().getComponent("aws2-sqs"); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); @@ -72,7 +72,7 @@ public class SqsComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testConnectivityAndRegion() throws Exception { + public void testConnectivityAndRegion() { Component component = context().getComponent("aws2-sqs"); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java index 7afc88b..93f9869 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java @@ -44,10 +44,10 @@ public class SqsConsumerIdleMessageTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("aws2-sqs://MyQueue?amazonSQSClient=#amazonSQSClient&delay=50&maxMessagesPerPoll=5" + "&sendEmptyMessageWhenIdle=true").to("mock:result"); } diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java index 404560a..2a5b8fc 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java @@ -62,10 +62,10 @@ public class SqsDoesNotExtendMessageVisibilityTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("aws2-sqs://MyQueue?amazonSQSClient=#amazonSQSClient").to("mock:result"); } }; diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java index f1f82e79..cda9488 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java @@ -50,7 +50,7 @@ public class SqsProducerBatchTest extends CamelTestSupport { template.send("direct:start", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Collection c = new ArrayList<Integer>(); c.add("team1"); c.add("team2"); @@ -66,10 +66,10 @@ public class SqsProducerBatchTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to("aws2-sqs://camel-1?amazonSQSClient=#client&operation=sendBatchMessage") .to("mock:result"); } diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteQueueTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteQueueTest.java index b962091..34e67857 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteQueueTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteQueueTest.java @@ -46,7 +46,7 @@ public class SqsProducerDeleteQueueTest extends CamelTestSupport { template.send("direct:start", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Sqs2Constants.SQS_QUEUE_PREFIX, "camel-1"); } }); @@ -56,10 +56,10 @@ public class SqsProducerDeleteQueueTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to("aws2-sqs://camel-1?amazonSQSClient=#client&operation=deleteQueue").to("mock:result"); } }; diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java index 70dc909..12024f0 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java @@ -47,7 +47,7 @@ public class SqsProducerDeleteTest extends CamelTestSupport { template.send("direct:start", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Sqs2Constants.RECEIPT_HANDLE, "123456"); } }); @@ -57,10 +57,10 @@ public class SqsProducerDeleteTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to("aws2-sqs://camel-1?amazonSQSClient=#client&operation=deleteMessage").to("mock:result"); } }; diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java index cf5397e..27a7445 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java @@ -48,7 +48,7 @@ public class SqsProducerListQueuesTest extends CamelTestSupport { template.send("direct:start", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Sqs2Constants.RECEIPT_HANDLE, "123456"); } }); @@ -59,10 +59,10 @@ public class SqsProducerListQueuesTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to("aws2-sqs://camel-1?amazonSQSClient=#client&operation=listQueues").to("mock:result"); } }; diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java index 7604311..f16d69d 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerPurgeTest.java @@ -47,7 +47,7 @@ public class SqsProducerPurgeTest extends CamelTestSupport { template.send("direct:start", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); assertMockEndpointsSatisfied(); @@ -56,10 +56,10 @@ public class SqsProducerPurgeTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to("aws2-sqs://camel-1?amazonSQSClient=#client&operation=purgeQueue").to("mock:result"); } }; diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentLocalstackIT.java index 6474e82..c29917e 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentLocalstackIT.java @@ -42,7 +42,7 @@ public class SqsComponentLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("This is my message text."); } }); @@ -66,7 +66,7 @@ public class SqsComponentLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOut, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("This is my message text."); } }); @@ -86,7 +86,7 @@ public class SqsComponentLocalstackIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { final String sqsEndpointUri = String .format("aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true", sharedNameGenerator.getName(), @@ -95,7 +95,7 @@ public class SqsComponentLocalstackIT extends Aws2SQSBaseTest { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").to(sqsEndpointUri); from(sqsEndpointUri).to("mock:result"); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageLocalstackIT.java index 22990f0..32f409f 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageLocalstackIT.java @@ -38,13 +38,13 @@ public class SqsConsumerMessageLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("ignore"); } }); exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("test1"); } }); @@ -53,11 +53,11 @@ public class SqsConsumerMessageLocalstackIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2).toF("aws2-sqs://%s?autoCreateQueue=true", sharedNameGenerator.getName()); fromF("aws2-sqs://%s?deleteAfterRead=false&deleteIfFiltered=true&autoCreateQueue=true", diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsDeadletterWithClientRegistryLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsDeadletterWithClientRegistryLocalstackIT.java index a399f5d..a27f627 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsDeadletterWithClientRegistryLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsDeadletterWithClientRegistryLocalstackIT.java @@ -49,7 +49,7 @@ public class SqsDeadletterWithClientRegistryLocalstackIT extends Aws2SQSBaseTest result.expectedMessageCount(1); template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("test1"); } }); @@ -58,11 +58,11 @@ public class SqsDeadletterWithClientRegistryLocalstackIT extends Aws2SQSBaseTest } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { String deadletterName = sharedNameGenerator.getName() + "_deadletter"; errorHandler(deadLetterChannel(String.format("aws2-sqs://%s?autoCreateQueue=true", deadletterName)) diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerAutoCreateQueueLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerAutoCreateQueueLocalstackIT.java index e4ea325..3833c1d 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerAutoCreateQueueLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerAutoCreateQueueLocalstackIT.java @@ -56,7 +56,7 @@ public class SqsProducerAutoCreateQueueLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(5); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Collection c = new ArrayList<Integer>(); c.add("1"); c.add("2"); @@ -71,11 +71,11 @@ public class SqsProducerAutoCreateQueueLocalstackIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2).setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage")) .toF("aws2-sqs://%s?autoCreateQueue=true", "queue-2001"); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoLocalstackIT.java index 1c7a476..742ab95 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoLocalstackIT.java @@ -42,7 +42,7 @@ public class SqsProducerBatchSendFifoLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Collection c = new ArrayList<Integer>(); c.add("2"); exchange.getIn().setBody(c); @@ -53,7 +53,7 @@ public class SqsProducerBatchSendFifoLocalstackIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { final String sqsEndpointUri = String.format( "aws2-sqs://%s.fifo?messageGroupIdStrategy=useExchangeId" + "&messageDeduplicationIdStrategy=useContentBasedDeduplication&autoCreateQueue=true", @@ -61,7 +61,7 @@ public class SqsProducerBatchSendFifoLocalstackIT extends Aws2SQSBaseTest { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2).setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage")) .to(sqsEndpointUri); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendLocalstackIT.java index 5f7fa2d..0297681 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendLocalstackIT.java @@ -42,7 +42,7 @@ public class SqsProducerBatchSendLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(5); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Collection c = new ArrayList<Integer>(); c.add("1"); c.add("2"); @@ -57,11 +57,11 @@ public class SqsProducerBatchSendLocalstackIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2).setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage")) .toF("aws2-sqs://%s?autoCreateQueue=true", sharedNameGenerator.getName()); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendWithSeparatorLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendWithSeparatorLocalstackIT.java index 3069544..888385e 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendWithSeparatorLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendWithSeparatorLocalstackIT.java @@ -39,7 +39,7 @@ public class SqsProducerBatchSendWithSeparatorLocalstackIT extends Aws2SQSBaseTe result.expectedMessageCount(5); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("1,2,3,4,5"); } }); @@ -48,11 +48,11 @@ public class SqsProducerBatchSendWithSeparatorLocalstackIT extends Aws2SQSBaseTe } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2).setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage")) .toF("aws2-sqs://%s?autoCreateQueue=true", sharedNameGenerator.getName()); diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageLocalstackIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageLocalstackIT.java index 5c4e15b..8351bb2 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageLocalstackIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageLocalstackIT.java @@ -38,7 +38,7 @@ public class SqsProducerDeleteMessageLocalstackIT extends Aws2SQSBaseTest { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("Test sqs"); } }); @@ -47,11 +47,11 @@ public class SqsProducerDeleteMessageLocalstackIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2).toF("aws2-sqs://%s?autoCreateQueue=true", sharedNameGenerator.getName()); fromF("aws2-sqs://%s?deleteAfterRead=false&autoCreateQueue=true", sharedNameGenerator.getName()) diff --git a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerSendLocalstackMaxAttributesIT.java b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerSendLocalstackMaxAttributesIT.java index d4fd740..dc23f7b 100644 --- a/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerSendLocalstackMaxAttributesIT.java +++ b/components/camel-aws/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerSendLocalstackMaxAttributesIT.java @@ -39,7 +39,7 @@ public class SqsProducerSendLocalstackMaxAttributesIT extends Aws2SQSBaseTest { result.expectedMessageCount(1); Exchange exchange = template.send("direct:start", ExchangePattern.InOnly, new Processor() { - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader("value1", "value1"); exchange.getIn().setHeader("value2", "value2"); exchange.getIn().setHeader("value3", "value3"); @@ -60,11 +60,11 @@ public class SqsProducerSendLocalstackMaxAttributesIT extends Aws2SQSBaseTest { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").startupOrder(2) .toF("aws2-sqs://%s?autoCreateQueue=true", sharedNameGenerator.getName()).to("mock:result");
