ppalaga commented on issue #2216:
URL: https://github.com/apache/camel-quarkus/issues/2216#issuecomment-775913881


   > Maybe you need to have a look at test-infra folder on main camel. There is 
the possibility to re-use that stuff in quarkus too. 
   
   Thanks for the pointer, I was not aware of Localstack being used there. 
   
   As far as I can see, Localstack is integrated via a custom client set in the 
component config  
https://github.com/apache/camel/blob/master/components/camel-aws2-sns/src/test/java/org/apache/camel/component/aws2/sns/localstack/Aws2SNSBaseTest.java#L38
   
   That's a bit complicated, IMO. Having `uri-endpoint-override` on all AWS2 
components would make the testing easier in Camel Quarkus. It is because in 
that way, we can set it from the `TestResource` which declares the environment 
for the test app. While it is easy to set a primitive type property (such as 
`uri-endpoint-override`), it is impossible to pass an object (such as custom 
client), because the `TestResource` may potentially run in a process distinct 
from the test app.
   
   While adding `uri-endpoint-override` options to all AWS2 component is my 
preference, I still acknowledge that testing-only options might be seen as 
polluting the API. So I am open to other proposals or even adopting the custom 
client approach on the Camel Quarkus side.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to