JiriOndrusek commented on a change in pull request #3116:
URL: https://github.com/apache/camel-quarkus/pull/3116#discussion_r713677832
##########
File path:
integration-test-groups/aws2/aws2-ddb/src/main/resources/application.properties
##########
@@ -15,10 +15,16 @@
## limitations under the License.
## ---------------------------------------------------------------------------
-camel.component.aws2-ddb.access-key=${AWS_ACCESS_KEY}
-camel.component.aws2-ddb.secret-key=${AWS_SECRET_KEY}
-camel.component.aws2-ddb.region=${AWS_REGION:us-east-1}
+#client for aws2-ddb is created by quarkus extension
io.quarkus:quarkus-amazon-dynamodb
+quarkus.dynamodb.aws.region=${AWS_REGION:us-east-1}
+quarkus.dynamodb.aws.credentials.type=static
+quarkus.dynamodb.aws.credentials.static-provider.access-key-id=${AWS_ACCESS_KEY}
+quarkus.dynamodb.aws.credentials.static-provider.secret-access-key=${AWS_SECRET_KEY}
+quarkus.dynamodb.sync-client.type=apache
+quarkus.dynamodb.endpoint-override=${AWS_CONTAINER_CREDENTIALS_FULL_URI:}
+
+#client for aws2-ddbstreams is created by camel component
Review comment:
@zhfeng I investigated it and it is correct. Let me explain:
Quarkus extension is creating `DynamoDbClient`, which is autowired here:
https://github.com/apache/camel/blob/main/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddb/Ddb2Configuration.java#L39
But ddbstreams is autowring `DynamoDbStreamsClient` here:
https://github.com/apache/camel/blob/main/components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamConfiguration.java#L44
Which is not autowired because stream client doesn't exist. Therefore client
for stream tests is created by component (as is described in properties)
I'm doing one small code change though. There is no need to define client
properties for ddbstream client in `application.properties`, because it is
created in `integration-tests-support-aws` and values in application.properties
doesn't matter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]