Skip to content

GH-3839: Migrate MongoDB tests to Testcontainers #3852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

oxcafedead
Copy link
Contributor

Closes #3839

  • Create a new base interface for Mongo container-based tests
  • Migrate all tests to JUnit5
  • Remove obsolete classes related to JUnit4 Mongo rule
  • Fix code style & readability here and there, a few Sonar issues
  • Fix failing test validateWithConfiguredPollerFlow
    • This test was failing with Mongo error
      $and/$or/$nor must be a nonempty array. The cause was too small
      polling ratio of the update query, the consecutive read queries
      failed as no 'Oleg' document was in collection after ~100 ms.

Closes spring-projects#3839

* Create a new base interface for Mongo container-based tests
* Migrate all tests to JUnit5
* Remove obsolete classes related to JUnit4 Mongo rule
* Fix code style & readability here and there, a few Sonar issues
* Fix failing test `validateWithConfiguredPollerFlow`
* * This test was failing with Mongo error
`$and/$or/$nor must be a nonempty array`. The cause was too small
polling ratio of the update query, the consecutive read queries
failed as no 'Oleg' document was in collection after ~100 ms.
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this is great. As usual.
I left just a couple minor concerns and some nit-picks to make it perfect.

Thank you!

Closes spring-projects#3839

Couple of changes after the pull request review:
* Get back the blank lines in test classes
* Get back the blank lines for some inner classes
* Eliminate bad renaming consequences
* Remove a couple of garbage todos
* Couple of places with code cleanup
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Pulling locally for the final review and merge.

@artembilan
Copy link
Member

Merged as 50769d0

@oxcafedead , thank you again!

@artembilan artembilan closed this Jul 19, 2022
@oxcafedead oxcafedead deleted the GH-3839 branch July 20, 2022 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate MongoDB tests to Testcontainers
2 participants