mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-09 13:22:01 +00:00
Merge pull request #2765 from matrix-org/rav/fix_room_uts
Fix flaky test_rooms UTs
This commit is contained in:
commit
a767f06e3f
@ -515,9 +515,6 @@ class RoomsCreateTestCase(RestTestCase):
|
||||
|
||||
synapse.rest.client.v1.room.register_servlets(hs, self.mock_resource)
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_post_room_no_keys(self):
|
||||
# POST with no config keys, expect new room id
|
||||
|
@ -12,7 +12,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import twisted
|
||||
from twisted.trial import unittest
|
||||
|
||||
import logging
|
||||
@ -65,6 +65,10 @@ class TestCase(unittest.TestCase):
|
||||
|
||||
@around(self)
|
||||
def setUp(orig):
|
||||
# enable debugging of delayed calls - this means that we get a
|
||||
# traceback when a unit test exits leaving things on the reactor.
|
||||
twisted.internet.base.DelayedCall.debug = True
|
||||
|
||||
old_level = logging.getLogger().level
|
||||
|
||||
if old_level != level:
|
||||
|
@ -58,6 +58,10 @@ def setup_test_homeserver(name="test", datastore=None, config=None, **kargs):
|
||||
config.email_enable_notifs = False
|
||||
config.block_non_admin_invites = False
|
||||
|
||||
# disable user directory updates, because they get done in the
|
||||
# background, which upsets the test runner.
|
||||
config.update_user_directory = False
|
||||
|
||||
config.use_frozen_dicts = True
|
||||
config.database_config = {"name": "sqlite3"}
|
||||
config.ldap_enabled = False
|
||||
|
Loading…
Reference in New Issue
Block a user