logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

Test MongoDB appender against Docker image

Open ppkarwasz opened this issue 2 years ago • 2 comments

Right now (after #1589), we are using Embedded MongoDB to:

  • download a MongoDB distribution on our system,
  • run it with the correct parameters,
  • test the MongoDB appender.

This procedure has some problems:

  1. we cannot run tests in parallel on a clean system (each test tries to download MongoDB at the same time),
  2. the MongoDB distribution depends on some system libraries that are not always present.

Therefore we should move the tests to use TestContainers or an equivalent solution and the official Docker mongo images.

ppkarwasz avatar Jan 23 '24 09:01 ppkarwasz

@garydgregory, could you look into this?

ppkarwasz avatar Jan 23 '24 09:01 ppkarwasz

@garydgregory, @ppkarwasz, I would prefer a uniform container-based testing across the code base. log4j-layout-template-json-test uses docker-maven-plugin behind a docker profile. I am in favor of adapting this to log4j-mongodb* modules.

If we will be going to Testontainers route, which is fine, I would appreciate it if we can migrate log4j-layout-template-json-test there too.

vy avatar Jan 23 '24 09:01 vy