mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-03 04:44:48 -04:00
Use new EventPersistenceStore
This commit is contained in:
parent
73cf63784b
commit
3ca4c7c516
11 changed files with 44 additions and 19 deletions
|
@ -326,10 +326,16 @@ def setup_test_homeserver(
|
|||
if homeserverToUse.__name__ == "TestHomeServer":
|
||||
hs.setup_master()
|
||||
else:
|
||||
# If we have been given an explicit datastore we probably want to mock
|
||||
# out the DataStores somehow too. This all feels a bit wrong, but then
|
||||
# mocking the stores feels wrong too.
|
||||
datastores = Mock(datastore=datastore)
|
||||
|
||||
hs = homeserverToUse(
|
||||
name,
|
||||
db_pool=None,
|
||||
datastore=datastore,
|
||||
datastores=datastores,
|
||||
config=config,
|
||||
version_string="Synapse/tests",
|
||||
database_engine=db_engine,
|
||||
|
@ -647,7 +653,7 @@ def create_room(hs, room_id, creator_id):
|
|||
creator_id (str)
|
||||
"""
|
||||
|
||||
store = hs.get_datastore()
|
||||
persistence_store = hs.get_storage().persistence
|
||||
event_builder_factory = hs.get_event_builder_factory()
|
||||
event_creation_handler = hs.get_event_creation_handler()
|
||||
|
||||
|
@ -664,4 +670,4 @@ def create_room(hs, room_id, creator_id):
|
|||
|
||||
event, context = yield event_creation_handler.create_new_client_event(builder)
|
||||
|
||||
yield store.persist_event(event, context)
|
||||
yield persistence_store.persist_event(event, context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue