Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Disable frozen dicts by default #3987

Merged
merged 9 commits into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/3987.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable USE_FROZEN_DICTS for unittests by default.
7 changes: 6 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
POSTGRES_USER = os.environ.get("SYNAPSE_POSTGRES_USER", "postgres")
POSTGRES_BASE_DB = "_synapse_unit_tests_base_%s" % (os.getpid(),)

# Disable frozendicts by default, but enable if the environment var is set.
USE_FROZEN_DICTS = os.environ.get("SYNAPSE_USE_FROZEN_DICTS", False)


def setupdb():

Expand Down Expand Up @@ -136,6 +139,9 @@ def default_config(name):
config.rc_messages_per_second = 10000
config.rc_message_burst_count = 10000

# Use frozendicts if they're asked for.
config.use_frozen_dicts = bool(USE_FROZEN_DICTS)

# we need a sane default_room_version, otherwise attempts to create rooms will
# fail.
config.default_room_version = "1"
Expand Down Expand Up @@ -182,7 +188,6 @@ def setup_test_homeserver(
if config is None:
config = default_config(name)

config.use_frozen_dicts = True
config.ldap_enabled = False

if "clock" not in kargs:
Expand Down