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

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

commit e0feab594fb20347f4526fa43662cd6a13f1b6eb
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Dec 21 11:24:13 2018 +0100

    CAMEL-13013 - Fixed CS and test
---
 .../main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java | 1 -
 .../camel/component/aws/sns/SnsComponentConfigurationTest.java    | 8 +++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
index 04cd02d..c50334e 100644
--- 
a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
+++ 
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
@@ -101,7 +101,6 @@ public class SnsEndpoint extends DefaultEndpoint implements 
HeaderFilterStrategy
             headerFilterStrategy = new SnsHeaderFilterStrategy();
         }
         
-        System.err.println(configuration.getTopicArn());
         if (configuration.getTopicArn() == null) {
             try {
                 String nextToken = null;
diff --git 
a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
 
b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
index 38da85e..72b139b 100644
--- 
a/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
+++ 
b/components/camel-aws/src/test/java/org/apache/camel/component/aws/sns/SnsComponentConfigurationTest.java
@@ -122,7 +122,8 @@ public class SnsComponentConfigurationTest extends 
CamelTestSupport {
         ((JndiRegistry) ((PropertyPlaceholderDelegateRegistry) 
context.getRegistry()).getRegistry()).bind("amazonSNSClient", mock);
         ((JndiRegistry) ((PropertyPlaceholderDelegateRegistry) 
context.getRegistry()).getRegistry()).bind("amazonSQSClient", mockSQS);
         SnsComponent component = new SnsComponent(context);
-        SnsEndpoint endpoint = (SnsEndpoint) 
component.createEndpoint("aws-sns://MyTopic?amazonSNSClient=#amazonSNSClient&accessKey=xxx&secretKey=yyy&amazonSQSClient=#amazonSQSClient&queueUrl=arn:aws:sqs:us-east-1:541925086079:MyQueue&subscribeSNStoSQS=true");
+        SnsEndpoint endpoint = (SnsEndpoint) 
component.createEndpoint("aws-sns://MyTopic?amazonSNSClient=#amazonSNSClient&" 
+ 
+        
"accessKey=xxx&secretKey=yyy&amazonSQSClient=#amazonSQSClient&queueUrl=arn:aws:sqs:us-east-1:541925086079:MyQueue&subscribeSNStoSQS=true");
         
         assertEquals("MyTopic", endpoint.getConfiguration().getTopicName());
         assertEquals("xxx", endpoint.getConfiguration().getAccessKey());
@@ -135,7 +136,7 @@ public class SnsComponentConfigurationTest extends 
CamelTestSupport {
         assertNull(endpoint.getConfiguration().getPolicy());
     }
     
-    @Test
+    @Test(expected = IllegalArgumentException.class)
     public void createEndpointWithSQSSubscriptionIllegalArgument() throws 
Exception {
         AmazonSNSClientMock mock = new AmazonSNSClientMock();
         AmazonSQSClientMock mockSQS = new AmazonSQSClientMock();
@@ -143,7 +144,8 @@ public class SnsComponentConfigurationTest extends 
CamelTestSupport {
         ((JndiRegistry) ((PropertyPlaceholderDelegateRegistry) 
context.getRegistry()).getRegistry()).bind("amazonSNSClient", mock);
         ((JndiRegistry) ((PropertyPlaceholderDelegateRegistry) 
context.getRegistry()).getRegistry()).bind("amazonSQSClient", mockSQS);
         SnsComponent component = new SnsComponent(context);
-        SnsEndpoint endpoint = (SnsEndpoint) 
component.createEndpoint("aws-sns://MyTopic?amazonSNSClient=#amazonSNSClient&accessKey=xxx&secretKey=yyy&amazonSQSClient=#amazonSQSClient&subscribeSNStoSQS=true");
+        SnsEndpoint endpoint = (SnsEndpoint) 
component.createEndpoint("aws-sns://MyTopic?amazonSNSClient=#amazonSNSClient&accessKey=xxx"
 + 
+        
"&secretKey=yyy&amazonSQSClient=#amazonSQSClient&subscribeSNStoSQS=true");
         
         assertEquals("MyTopic", endpoint.getConfiguration().getTopicName());
         assertEquals("xxx", endpoint.getConfiguration().getAccessKey());

Reply via email to