mirror of https://github.com/zulip/zulip.git
tests: Don't use caching session engine in tests.
Because we run tests in parallel, the caching session engine can lead to nondeterministic failures.
This commit is contained in:
parent
063268246e
commit
0c44310009
|
@ -174,7 +174,7 @@ class HomeTest(ZulipTestCase):
|
|||
with queries_captured() as queries:
|
||||
result = self._get_home_page(stream='Denmark')
|
||||
|
||||
self.assert_length(queries, 39)
|
||||
self.assert_length(queries, 41)
|
||||
|
||||
html = result.content.decode('utf-8')
|
||||
|
||||
|
@ -237,7 +237,7 @@ class HomeTest(ZulipTestCase):
|
|||
with queries_captured() as queries2:
|
||||
result = self._get_home_page()
|
||||
|
||||
self.assert_length(queries2, 33)
|
||||
self.assert_length(queries2, 34)
|
||||
|
||||
# Do a sanity check that our new streams were in the payload.
|
||||
html = result.content.decode('utf-8')
|
||||
|
|
|
@ -47,7 +47,7 @@ class ActivityTest(ZulipTestCase):
|
|||
with queries_captured() as queries:
|
||||
self.client_get('/activity')
|
||||
|
||||
self.assert_length(queries, 3)
|
||||
self.assert_length(queries, 4)
|
||||
|
||||
class TestClientModel(ZulipTestCase):
|
||||
def test_client_stringification(self):
|
||||
|
|
|
@ -93,6 +93,9 @@ CACHES['database'] = {
|
|||
}
|
||||
}
|
||||
|
||||
# Disable caching on sessions to make query counts consistent
|
||||
SESSION_ENGINE = "django.contrib.sessions.backends.db"
|
||||
|
||||
# Use production config from Webpack in tests
|
||||
if CASPER_TESTS:
|
||||
WEBPACK_FILE = 'webpack-stats-production.json'
|
||||
|
|
Loading…
Reference in New Issue