mirror of https://github.com/zulip/zulip.git
71f97b7bcb
To get accurate count of the queries, we should make sure that caches don't come into play. If we count queries while caches are filled, we will get a lower count. Caches are not supposed to be persistent, so our test can also fail if cache is invalidated during the course of the unit test. This commit solves the problem with Stream cache. This cache comes into play when we use `get_stream` function. If cache is valid, we will not issue queries to Stream and Recipient table. I think the problem was one of those rare occasions when the Stream cache got invalidated during the course of the test, due to which query count was increased by 2. After this commit, we intentially invalidate the Stream cache. |
||
---|---|---|
.. | ||
fixtures | ||
lib | ||
management | ||
migrations | ||
outgoing_webhooks | ||
templatetags | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
exceptions.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py | ||
static_header.txt | ||
storage.py |