nifi icon indicating copy to clipboard operation
nifi copied to clipboard

NIFI-10562 Added MongoDB testcontainers to support integration testing.

Open MikeThomsen opened this issue 3 years ago • 7 comments

Summary

NIFI-00000

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

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 main branch
  • [ ] 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 LICENSE and NOTICE files

Documentation

  • [ ] Documentation formatting appears as expected in rendered files

MikeThomsen avatar Sep 29 '22 11:09 MikeThomsen

@exceptionfactory can I get a review?

MikeThomsen avatar Sep 29 '22 16:09 MikeThomsen

@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.

exceptionfactory avatar Sep 29 '22 17:09 exceptionfactory

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).

MikeThomsen avatar Sep 29 '22 18:09 MikeThomsen

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.

MikeThomsen avatar Sep 29 '22 18:09 MikeThomsen

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).

Thanks for the confirmation, that is helpful to know.

exceptionfactory avatar Sep 29 '22 18:09 exceptionfactory

@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.

MikeThomsen avatar Oct 05 '22 16:10 MikeThomsen

@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?

MikeThomsen avatar Oct 06 '22 15:10 MikeThomsen

Going to redo this from scratch @exceptionfactory to limit the scope.

MikeThomsen avatar Nov 09 '22 16:11 MikeThomsen

Going to redo this from scratch @exceptionfactory to limit the scope.

Thanks @MikeThomsen, sounds good!

exceptionfactory avatar Nov 09 '22 16:11 exceptionfactory