You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/11/17 07:44:36 UTC

[camel] 03/06: CAMEL-15836 - Camel-AWS2-Lambda: enable autowire on the Lambda Client, fixed tests

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 08c3f0130e16234715019c7e8a0247a3bf0639e9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Nov 17 08:34:30 2020 +0100

    CAMEL-15836 - Camel-AWS2-Lambda: enable autowire on the Lambda Client, fixed tests
---
 .../aws2/lambda/LambdaComponentClientRegistryTest.java    | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java b/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java
index 679e126..bdca36f 100644
--- a/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java
+++ b/components/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java
@@ -53,20 +53,7 @@ public class LambdaComponentClientRegistryTest extends CamelTestSupport {
     }
 
     @Test
-    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
-
-        LambdaClient awsLambdaClient = new AmazonLambdaClientMock();
-        context.getRegistry().bind("awsLambdaClient", awsLambdaClient);
-        Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class);
-        Lambda2Endpoint endpoint = (Lambda2Endpoint) component
-                .createEndpoint(
-                        "aws2-lambda://myFunction?operation=getFunction&accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
-        assertNotSame(awsLambdaClient, endpoint.getConfiguration().getAwsLambdaClient());
-    }
-
-    @Test
-    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+    public void createEndpointWithAutowire() throws Exception {
 
         LambdaClient awsLambdaClient = new AmazonLambdaClientMock();
         context.getRegistry().bind("awsLambdaClient", awsLambdaClient);