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

Commit

Permalink
Set default room version to v4. (#5379)
Browse files Browse the repository at this point in the history
Set default room version to v4.
  • Loading branch information
neilisfragile authored Jun 6, 2019
1 parent 1b8cb64 commit a118650
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/5379.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set default room version to v4.
2 changes: 1 addition & 1 deletion docs/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pid_file: DATADIR/homeserver.pid
# For example, for room version 1, default_room_version should be set
# to "1".
#
#default_room_version: "1"
#default_room_version: "4"

# The GC threshold parameters to pass to `gc.set_threshold`, if defined
#
Expand Down
2 changes: 1 addition & 1 deletion synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# in the list.
DEFAULT_BIND_ADDRESSES = ['::', '0.0.0.0']

DEFAULT_ROOM_VERSION = "1"
DEFAULT_ROOM_VERSION = "4"


class ServerConfig(Config):
Expand Down
6 changes: 6 additions & 0 deletions tests/storage/test_cleanup_extrems.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
class CleanupExtremBackgroundUpdateStoreTestCase(HomeserverTestCase):
"""Test the background update to clean forward extremities table.
"""
def make_homeserver(self, reactor, clock):
# Hack until we understand why test_forked_graph_cleanup fails with v4
config = self.default_config()
config['default_room_version'] = '1'
return self.setup_test_homeserver(config=config)

def prepare(self, reactor, clock, homeserver):
self.store = homeserver.get_datastore()
Expand Down Expand Up @@ -220,6 +225,7 @@ def test_forked_graph_cleanup(self):
Where SF* are soft failed, and with them A, B and C marked as
extremities. This should resolve to B and C being marked as extremity.
"""

# Create the room graph
event_id_a = self.create_and_send_event()
event_id_b = self.create_and_send_event()
Expand Down
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from synapse.api.errors import CodeMessageException, cs_error
from synapse.api.room_versions import RoomVersions
from synapse.config.homeserver import HomeServerConfig
from synapse.config.server import DEFAULT_ROOM_VERSION
from synapse.federation.transport import server as federation_server
from synapse.http.server import HttpServer
from synapse.server import HomeServer
Expand Down Expand Up @@ -173,7 +174,7 @@ def default_config(name, parse=False):
"use_frozen_dicts": False,
# We need a sane default_room_version, otherwise attempts to create
# rooms will fail.
"default_room_version": "1",
"default_room_version": DEFAULT_ROOM_VERSION,
# disable user directory updates, because they get done in the
# background, which upsets the test runner.
"update_user_directory": False,
Expand Down

0 comments on commit a118650

Please sign in to comment.