You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by GitBox <gi...@apache.org> on 2020/03/21 22:44:33 UTC

[GitHub] [gora] drazzib opened a new pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests

drazzib opened a new pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206
 
 
   - Update `gora-mongodb/pom.xml` to use testcontainers    
       * Remove `de.flapdoodle.embed.mongo` dependency
       * Remove `mongo.embed.version` property
       * Add `org.testcontainers` dependency
   - Create `MongoContainer` and it as a JUnit `@ClassRule`
   - Add new test for MongoDB 4.2
   - Refactor `GoraMongodbTestDriver`  
       * Provided container (passed in constructor) to configure Gora properties
   - Update `gora-benchmark/pom.xml` to depends on `gora-mongodb:test-jar`
       We can import MongoContainer in GoraClientTest
       (with fixed MongoDB port on localhost)
   - Refactor `GoraMongodbAuthenticationTestDriver`
       * Use MongoDB docker container feature to initialize superuser (via environment variables)
       * Pass `--auth` and `--setParameter authenticationMechanisms` as commands
       * Use mongo shell CLI - inside container - to execute script

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


With regards,
Apache Git Services

[GitHub] [gora] lewismc commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
lewismc commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#issuecomment-605498884
 
 
   Nice...

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


With regards,
Apache Git Services

[GitHub] [gora] drazzib commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
drazzib commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#issuecomment-605498120
 
 
   Hi @djkevincr!
   
   Thanks a lot for you feedback on my proposal for using Testcontainers on `gora-mongodb` module.
   
   I've just created a temporary `gora-testcontainers` job (copied from `gora-trunk`) on https://builds.apache.org/ to perform a functionnal check of this `GORA-647-test-containers-mongo` branch with real Apache Jenkins slaves.
   
   AFAICT from [Jenkins logs](https://builds.apache.org/view/E-G/view/Gora/job/gora-testcontainers/org.apache.gora$gora-mongodb/1/console), Docker containers seems properly supported :+1: 
   ```
   [INFO] --- maven-surefire-plugin:2.20:test (default-test) @ gora-mongodb ---
   [WARNING] The parameter forkMode is deprecated since version 2.14. Use forkCount and reuseForks instead.
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.gora.mongodb.filters.DefaultFactoryTest
   [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.566 s - in org.apache.gora.mongodb.filters.DefaultFactoryTest
   [INFO] Running org.apache.gora.mongodb.mapreduce.TestMongoStoreWordCount
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.014 s - in org.apache.gora.mongodb.mapreduce.TestMongoStoreWordCount
   [INFO] Running org.apache.gora.mongodb.mapreduce.TestMongoStoreCountQuery
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.375 s - in org.apache.gora.mongodb.mapreduce.TestMongoStoreCountQuery
   [INFO] Running org.apache.gora.mongodb.utils.TestBSONDecorator
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.085 s - in org.apache.gora.mongodb.utils.TestBSONDecorator
   [INFO] Running org.apache.gora.mongodb.store.TestMongoStore34
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 70.838 s - in org.apache.gora.mongodb.store.TestMongoStore34
   [INFO] Running org.apache.gora.mongodb.store.TestMongoMappingBuilder
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.382 s - in org.apache.gora.mongodb.store.TestMongoMappingBuilder
   [INFO] Running org.apache.gora.mongodb.store.TestMongoStore36
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.844 s - in org.apache.gora.mongodb.store.TestMongoStore36
   [INFO] Running org.apache.gora.mongodb.store.TestMongoMapping
   [INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.201 s - in org.apache.gora.mongodb.store.TestMongoMapping
   [INFO] Running org.apache.gora.mongodb.store.TestMongoStore42
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 69.541 s - in org.apache.gora.mongodb.store.TestMongoStore42
   [INFO] Running org.apache.gora.mongodb.store.TestMongoStore40
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 66.416 s - in org.apache.gora.mongodb.store.TestMongoStore40
   [INFO] Running org.apache.gora.mongodb.authentications.PLAIN_AuthenticationTest
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 60.273 s - in org.apache.gora.mongodb.authentications.PLAIN_AuthenticationTest
   [INFO] Running org.apache.gora.mongodb.authentications.SCRAM_SHA_1_AuthenticationTest
           ?? Checking the system...
           ? Docker version is newer than 1.6.0
           ? Docker environment has more than 2GB free
           ? File should be mountable
           ? Exposed port is accessible
   [INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 57.968 s - in org.apache.gora.mongodb.authentications.SCRAM_SHA_1_AuthenticationTest
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 321, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   So I would like to proceed with merge of this branch. Are you okay with this ?

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


With regards,
Apache Git Services

[GitHub] [gora] djkevincr edited a comment on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
djkevincr edited a comment on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#issuecomment-604536989
 
 
   @drazzib Some of the data stores which make use of TestContainers, we had to disable the tests from execution due to unavailability of docker environment in Apache Jenkins machines. This is to pass tests in Apache Gora Jenkins build. If that is still the case, we may need to disable for the mongo store datastore tests from pom file. Thank you for taking over this. :)

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


With regards,
Apache Git Services

[GitHub] [gora] djkevincr commented on a change in pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
djkevincr commented on a change in pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#discussion_r396354503
 
 

 ##########
 File path: gora-mongodb/src/test/java/org/apache/gora/mongodb/MongoContainer.java
 ##########
 @@ -0,0 +1,24 @@
+package org.apache.gora.mongodb;
 
 Review comment:
   Shall we add License header for the file?

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


With regards,
Apache Git Services

[GitHub] [gora] drazzib commented on a change in pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
drazzib commented on a change in pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#discussion_r396464367
 
 

 ##########
 File path: gora-mongodb/src/test/java/org/apache/gora/mongodb/MongoContainer.java
 ##########
 @@ -0,0 +1,24 @@
+package org.apache.gora.mongodb;
 
 Review comment:
   @djkevincr Good catch, will add licence header.

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


With regards,
Apache Git Services

[GitHub] [gora] djkevincr edited a comment on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
djkevincr edited a comment on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#issuecomment-604536989
 
 
   @drazzib Some of the data stores which make use of TestContainers, we had to disable the tests from execution due to unavailability of docker environment in Apache Jenkins machines. This is to pass tests in Apache Gora Jenkins build. If that is still the case, we may need to disable the mongo store datastore tests from pom file. Thank you for taking over this. :)

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


With regards,
Apache Git Services

[GitHub] [gora] djkevincr commented on a change in pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
djkevincr commented on a change in pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#discussion_r396354128
 
 

 ##########
 File path: gora-mongodb/src/test/java/org/apache/gora/mongodb/MongoContainer.java
 ##########
 @@ -0,0 +1,24 @@
+package org.apache.gora.mongodb;
 
 Review comment:
   Shall we add License header for the file?

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


With regards,
Apache Git Services

[GitHub] [gora] drazzib merged pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
drazzib merged pull request #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206
 
 
   

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


With regards,
Apache Git Services

[GitHub] [gora] djkevincr commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
djkevincr commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#issuecomment-605501073
 
 
   +1, Yes please proceed merging the PR. Thank you for taking over this.

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


With regards,
Apache Git Services

[GitHub] [gora] djkevincr commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests

Posted by GitBox <gi...@apache.org>.
djkevincr commented on issue #206: GORA-647 Use Testcontainers for MongoDB integration tests
URL: https://github.com/apache/gora/pull/206#issuecomment-604536989
 
 
   @drazzib Some of the data stores which make use of TestContainers, we had to disable the tests from execution due to unavailability of docker environment in Apache Jenkins machines. If that is still the case, we may need to disable for the mongo store datastore tests from pom file. Thank you for taking over this. :)

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


With regards,
Apache Git Services