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

Fix tests on postgresql #3740

Merged
merged 28 commits into from
Sep 3, 2018
Merged

Fix tests on postgresql #3740

merged 28 commits into from
Sep 3, 2018

Conversation

hawkowl
Copy link
Contributor

@hawkowl hawkowl commented Aug 22, 2018

No description provided.

@hawkowl hawkowl requested a review from a team August 31, 2018 13:10
@hawkowl hawkowl changed the title [WIP] Fix tests on postgresql Fix tests on postgresql Aug 31, 2018
@@ -191,6 +190,7 @@ def user_last_seen_monthly_active(self, user_id):
allow_none=True,
desc="user_last_seen_monthly_active",
))
defer.returnValue(res)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for converting all these functions to defer.inlineCallbacks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me trying things and inadvertently committing it :) -- reverted

)
self.clock = self.hs.get_clock()
else:
self._cache_id_gen = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, fun fact: this now gets set on the slave replication stores as well as the store on master. This is a bit awkward because we do set self._cache_id_gen on the replication stores in synapse/replication/slave/storage/_base.py to something different.

In short, everything is awful and is scary and I'm scared about moving this here in case the replication stuff fail to properly overwrite this definition

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks legit. I've not gone through all the test changes, but they seem sane.

@hawkowl hawkowl merged commit 77055db into develop Sep 3, 2018
@hawkowl hawkowl deleted the hawkowl/pgtests branch September 3, 2018 16:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants