orpiske edited a comment on pull request #396: URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-680959042
@unsortedhashsets thanks for the PR. I understand the problem you are trying to solve. Unfortunately, this way it breaks the build. The build test is failing on local mode because on local mode the service only provides the host and port (so it is not form a valid connection URL when passed to the connection bean ref). You need to adjust the patch a little bit in order to achieve the results you need in both local and remote test mode. I would suggest replacing the `getHost` and `getPort` methods on the service [1] (and their local [2] and remote [3] implementations) with a single `getConnectionUrl` that provides the connection URL `mongodb://mongodb://user:pass@domain:port`. Therefore, instead of running the test like `-Dmongodb.host=mongodb://user:passw...@myhostname.com -Dmongodb.port=31244` you could pass it like this `-Dmongodb.url=mongodb://user:passw...@myhostname.com:31244`. Of course, this is just a suggestion and there may be other ways to solve this issue, but I think this would do the trick. If you have questions, feel free to ask I can guide you. 1. https://github.com/apache/camel-kafka-connector/blob/master/tests/itests-mongodb/src/test/java/org/apache/camel/kafkaconnector/mongodb/services/MongoDBService.java#L38 2. https://github.com/apache/camel-kafka-connector/blob/master/tests/itests-mongodb/src/test/java/org/apache/camel/kafkaconnector/mongodb/services/MongoDBLocalContainerService.java 3. https://github.com/apache/camel-kafka-connector/blob/master/tests/itests-mongodb/src/test/java/org/apache/camel/kafkaconnector/mongodb/services/RemoteMongoDBService.java ---------------------------------------------------------------- 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