mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
test_classes: Improve assert_database_query_count output message.
Output message should talk about both the cases: actual_count > expected_count and actual_count < expected_count. The message now includes information for the case where actual_query_count < expected_query_count. Fixes: #23325
This commit is contained in:
committed by
Tim Abbott
parent
914712beab
commit
38aa1ee1ff
@@ -1146,8 +1146,9 @@ Output:
|
|||||||
{count} queries expected, got {actual_count}.
|
{count} queries expected, got {actual_count}.
|
||||||
This is a performance-critical code path, where we check
|
This is a performance-critical code path, where we check
|
||||||
the number of database queries used in order to avoid accidental regressions.
|
the number of database queries used in order to avoid accidental regressions.
|
||||||
If the new query is necessary, you should update this test,
|
If an unnecessary query was removed or the new query is necessary, you should
|
||||||
and explain in the pull request why adding an additional query can't be avoided."""
|
update this test, and explain what queries we added/removed in the pull request
|
||||||
|
and why any new queries can't be avoided."""
|
||||||
)
|
)
|
||||||
|
|
||||||
def assert_json_error_contains(
|
def assert_json_error_contains(
|
||||||
|
|||||||
Reference in New Issue
Block a user