Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7821

Revisit the need to download Mongo for running IT tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.10.0, 1.9.10
    • mongomk
    • None

    Description

      The current approach to running IT tests on document-store seems to rely on downloading (&starting) the latest MongoDB. [0]

      I think there are a few problems with this:

      • the mechanics fail if you try to run IT tests offline and this will fail your build
      [INFO] Running org.apache.jackrabbit.oak.plugins.document.mongo.ReplicaSetDefaultWriteConcernIT
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.068 s <<< FAILURE! - in org.apache.jackrabbit.oak.plugins.document.mongo.ReplicaSetDefaultWriteConcernIT
      [ERROR] majorityWriteConcern(org.apache.jackrabbit.oak.plugins.document.mongo.ReplicaSetDefaultWriteConcernIT)  Time elapsed: 0.048 s  <<< ERROR!
      de.flapdoodle.embed.process.exceptions.DistributionException: java.io.IOException: Could not open inputStream for https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.10.tgz
          at org.apache.jackrabbit.oak.plugins.document.mongo.ReplicaSetDefaultWriteConcernIT.before(ReplicaSetDefaultWriteConcernIT.java:52)
      Caused by: java.io.IOException: Could not open inputStream for https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.10.tgz
          at org.apache.jackrabbit.oak.plugins.document.mongo.ReplicaSetDefaultWriteConcernIT.before(ReplicaSetDefaultWriteConcernIT.java:52)
      Caused by: java.net.UnknownHostException: fastdl.mongodb.org
          at org.apache.jackrabbit.oak.plugins.document.mongo.ReplicaSetDefaultWriteConcernIT.before(ReplicaSetDefaultWriteConcernIT.java:52)
      
      • the basic cache scheme is redundant against maven best practice of cleaning before building. the mongo archive will be downloaded under /target which is wiped clean if one runs mvn clean install.

      I understand the need to run mongo tests for coverage, so I'm not against having a smart setup, and I always try to run the entire integration suite before pushing a change, but this doesn't have to be so intrusive.

      [0] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongodProcessFactory.java#L68-L78

      Attachments

        Issue Links

          Activity

            People

              mreutegg Marcel Reutegger
              stillalex Alex Deparvu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: