-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch MongoDB tests to use Docker #2922
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement @ppkarwasz 😀
Does it mean you approve? If not, what changes are you expecting? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fat fingers! I approve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Locally verified the PR. Dropped some minor requests/questions.
Question: Will this get ported to 2.x
?
I will align the <activation>
of the docker
profile of log4j-template-layout-json-test
with this PR, once this gets merged.
log4j-mongodb/src/test/java/org/apache/logging/log4j/mongodb/MongoDbIT.java
Outdated
Show resolved
Hide resolved
log4j-mongodb/src/test/java/org/apache/logging/log4j/mongodb/MongoDbAuthFailureIT.java
Show resolved
Hide resolved
c275e34
to
6a59e03
Compare
Oh, tests are stuck, it must be Friday 13th again! 😉 |
MongoDB is a binary server. The current `log4j-mongodb` tests download a **generic** binary MongoDB distribution and try to run it. The distribution is not self-contained and requires several libraries (e.g., OpenSSL) to be available on the target host. Those libraries are not always available in the required version: e.g., currently MongoDB needs OpenSSL 1, but OpenSSL 3 is bundled in the most recent Debian. This PR switches from the binary distribution to the usage of the **latest** Docker image available. The advantages of this approach are: - We always test against the newest server version available. - The success of the tests does not depend on the libraries installed on the host. - Tests can run in parallel. In the current approach, parallel tests failed since each one tried to download MongoDB separately. The main disadvantage is that Docker will be required to test `log4j-mongodb`. This is the case for the CI, but individual developers might need to install it too. Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
b9e0df2
to
9cede69
Compare
MongoDB is a binary server. The current
log4j-mongodb
tests download a generic binary MongoDB distribution and try to run it. The distribution is not self-contained and requires several libraries (e.g., OpenSSL) to be available on the target host.Those libraries are not always available in the required version: e.g., currently MongoDB needs OpenSSL 1, but OpenSSL 3 is bundled in the most recent Debian.
This PR switches from the binary distribution to the usage of the latest Docker image available.
The advantages of this approach are:
The main disadvantage is that Docker will be required to test
log4j-mongodb
. This is the case for the CI, but individual developers might need to install it too.Fixes #2229.