nifi
nifi copied to clipboard
NIFI-10562 Added MongoDB testcontainers to support integration testing.
Summary
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
- [ ] Apache NiFi Jira issue created
Pull Request Tracking
- [ ] Pull Request title starts with Apache NiFi Jira issue number, such as
NIFI-00000 - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such
NIFI-00000
Pull Request Formatting
- [ ] Pull Request based on current revision of the
mainbranch - [ ] Pull Request refers to a feature branch with one commit containing changes
Verification
Please indicate the verification steps performed prior to pull request creation.
Build
- [ ] Build completed using
mvn clean install -P contrib-check- [ ] JDK 8
- [ ] JDK 11
- [ ] JDK 17
Licensing
- [ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
- [ ] New dependencies are documented in applicable
LICENSEandNOTICEfiles
Documentation
- [ ] Documentation formatting appears as expected in rendered files
@exceptionfactory can I get a review?
@MikeThomsen, sure, I have a couple other items to review, but will plan on taking a closer look. On a cursory review, there appears to be a new property and other changes in PutGridFS, is that intentional? It would be better to keep the changes focused to integration testing.
Yes, the changes to PutGridFS are intentional. Per the documentation, the md5 built-in attribute was deprecated and appears to have been removed as of MongoDB 5.X (6.x is the latest stable).
As you can see in the test, I used MongoDB V5 for the integration tests (couldn't get 6 to start up in Docker for some reason). With V5, the MD5 attribute wasn't there and caused two test failures.
Yes, the changes to
PutGridFSare intentional. Per the documentation, themd5built-in attribute was deprecated and appears to have been removed as of MongoDB 5.X (6.x is the latest stable).
Thanks for the confirmation, that is helpful to know.
@exceptionfactory any chance you could review this? To validate it, just run this with docker running:
mvn clean install -Pcontrib-check,integration-tests while Docker is running from the mongo bundle folder.
@ChrisSamo632 I can apply the changes I made to make Testcontainers optional for this one too. Do you have a little time to do a review?
Going to redo this from scratch @exceptionfactory to limit the scope.
Going to redo this from scratch @exceptionfactory to limit the scope.
Thanks @MikeThomsen, sounds good!