You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/08/26 14:47:48 UTC

[GitHub] [camel-kafka-connector] unsortedhashsets opened a new pull request #396: Fix mongodb test

unsortedhashsets opened a new pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396


   We need to pass variable to the mongodb.host in format mongodb://user:pass@domain otherway:
   [ERROR]   CamelSinkMongoDBITCase.setUp:63 » IllegalArgument The connection string is inv...
   [ERROR]   CamelSourceMongoDBITCase.setUp:66 » IllegalArgument The connection string is i...
   
   But if we pass in that format we receive mongodb://mongodb://user:pass@domain:port and:
   [ERROR] Failures: 
   [ERROR]   CamelSinkMongoDBITCase.testBasicSendReceive:120->runTest:100 Condition not met within timeout 30000. The connector CamelMongoDBSinkConnector did not start within a reasonable time
   [ERROR] Errors: 
   [ERROR]   CamelSourceMongoDBITCase.testFindAll » Timeout testFindAll() timed out after 9...
   
   With that fix - test will pass (tested with remote mongodb)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske commented on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-681623598


   > LGTM, @orpiske can you retake a look?
   
   Sure thing! I have just run the test again, with the latest changes from @unsortedhashsets and it is working. IMHO, it's good to merge. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske commented on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-680929923


   @oscerd sure thing, I will take a look :) 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske edited a comment on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
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:password@myhostname.com -Dmongodb.port=31244` you could pass it like this `-Dmongodb.url=mongodb://user:password@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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske edited a comment on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
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:password@myhostname.com -Dmongodb.port=31244` you could pass it like this `-Dmongodb.url=mongodb://user:password@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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] oscerd commented on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-681623995


   Thanks!


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske commented on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
orpiske commented on pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-681023936


   @unsortedhashsets I've just tested the changes and they are working well for local mode. 
   
   c/c @oscerd 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske commented on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
orpiske commented 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. 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:password@myhostname.com -Dmongodb.port=31244` you could pass it like this `-Dmongodb.url=mongodb://user:password@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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] oscerd merged pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
oscerd merged pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] unsortedhashsets commented on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
unsortedhashsets commented on pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-681032693


   Oh, sorry I have just finished remote test (success) and updated repo .


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [camel-kafka-connector] orpiske edited a comment on pull request #396: Fix mongodb test

Posted by GitBox <gi...@apache.org>.
orpiske edited a comment on pull request #396:
URL: https://github.com/apache/camel-kafka-connector/pull/396#issuecomment-681023936


   @unsortedhashsets I've just tested the changes and they are working well for local mode. Thanks!!!
   
   c/c @oscerd 


----------------------------------------------------------------
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:
users@infra.apache.org