MongoDB persistence adapter with Test Containers #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sven's practical approach to explaining hexagonal architecture is fantastic. Adding a persistence adapter that uses a non-relational technology is relevant, demonstrating even more explicitly that the rich domain can be fully reused.
MongoDB is a successful non-relational database system in the industry and integrates well into the Spring ecosystem. That is why it has been selected as an additional adapter in this excellent hexagonal architecture example. All tests, both unit tests and end-to-end tests, passed successfully.
The Singleton pattern was implemented to use the same MongoDB Docker container in both tests. I would be happy to receive feedback on how to improve this implementation:
See: https://java.testcontainers.org/test_framework_integration/manual_lifecycle_control/#singleton-containers
Of course, I am also happy to provide top-quality documentation on par with Sven's original documentation.
Co-authored-by: Francisco José Nebrera [email protected]