apache / apache/logging-log4j2

Test MongoDB appender against Docker image

Open
#2,229 2 comments 0 reactions 0 assignees View on GitHub
appenders:MongoDB
Dominant language
Java
Stars
3.6k
Forks
1.7k
Avg merge
21h 30m
Merged PRs (30d)
27

Description

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](https://testcontainers.com/) or an equivalent solution and the official [Docker `mongo`](https://hub.docker.com/_/mongo/) images.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the existing tests that use Embedded MongoDB and review how the MongoDB distribution is downloaded, started, and configured. Replace that test setup with TestContainers or an equivalent approach using the official mongo Docker images, then verify the MongoDB appender tests can run in parallel on a clean system.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, mongodb
Domain
database, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.