Skip to content
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

UnitTest testSqlQueryCount for GetEntity and GetCollection #3602

Merged

Conversation

pmattmann
Copy link
Member

@pmattmann pmattmann commented Jun 27, 2023

This PR shows an example how we could write UnitTests testing the number of required database queries.
This should prevent us form adding an N+1 performance problem by accident.

What do you think about?

@pmattmann pmattmann added the Meeting Discuss Am nächsten Core-Meeting besprechen label Jun 27, 2023
Copy link
Member

@manuelmeister manuelmeister left a comment

Choose a reason for hiding this comment

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

Core Meeting Decision

  • Test GetCollection
  • Test GetItem
  • Equal instead of less than

@manuelmeister manuelmeister removed the Meeting Discuss Am nächsten Core-Meeting besprechen label Aug 15, 2023
@pmattmann pmattmann self-assigned this Aug 15, 2023
@pmattmann pmattmann force-pushed the feature/unittest-number-of-database-queries branch 4 times, most recently from 0f028dd to f93695d Compare August 16, 2023 19:27
@pmattmann pmattmann force-pushed the feature/unittest-number-of-database-queries branch from f93695d to ced6075 Compare August 16, 2023 19:50
@pmattmann pmattmann changed the title List all day_Responsibles require 5 DB-Queries UnitTest testSqlQueryCount for GetEntity and GetCollection Aug 16, 2023
@pmattmann pmattmann marked this pull request as ready for review August 16, 2023 20:08
Copy link
Member

@carlobeltrame carlobeltrame left a comment

Choose a reason for hiding this comment

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

Thanks!

@pmattmann pmattmann merged commit 1db18c4 into ecamp:devel Aug 17, 2023
23 of 26 checks passed
@pmattmann pmattmann deleted the feature/unittest-number-of-database-queries branch August 17, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants