From 86d62322366a74f7fcf6f05b1c13f0e3acd3dc8b Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Tue, 2 Sep 2014 15:38:48 +0100 Subject: Don't eat federation transmit errors during unit tests; fix remote presence EDU-sending test because of this --- synapse/federation/replication.py | 1 - tests/handlers/test_presence.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py index cadf574b3b..564f629594 100644 --- a/synapse/federation/replication.py +++ b/synapse/federation/replication.py @@ -628,7 +628,6 @@ class _TransactionQueue(object): for deferred in deferreds: deferred.errback(e) - yield deferred finally: # We want to be *very* sure we delete this after we stop processing diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py index 618fb7f270..4583ff8bc6 100644 --- a/tests/handlers/test_presence.py +++ b/tests/handlers/test_presence.py @@ -719,6 +719,22 @@ class PresencePushTestCase(unittest.TestCase): ), defer.succeed((200, "OK")) ) + put_json.expect_call_and_return( + call("remote", + path=ANY, # Can't guarantee which txn ID will be which + data=_expect_edu("remote", "m.presence", + content={ + "push": [ + {"user_id": "@apple:test", + "presence": u"online", + "state": u"online", + "last_active_ago": 0}, + ], + } + ) + ), + defer.succeed((200, "OK")) + ) self.room_members = [self.u_apple, self.u_onion] -- cgit 1.4.1