mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
We use the queries_captured() context manager in our tests to capture queries that happen during certain actions. Usually we use the list of queries to validate that we're not doing too many database calls. For most tests the database calls are fairly deterministic, but SAVEPOINT-related things seem to be more random, and the number of savepoints is usually not relevant to what the test is trying to prevent, which is more serious problems like O(N) database fetches.
28 KiB
28 KiB