From 2d965b14c481cf3008d69a8c00780bda9c0fbe40 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 16 Dec 2019 12:16:36 +0000 Subject: [PATCH] workaround for https://github.com/matrix-org/synapse/issues/6536 I feel like there are going to be a lot of these --- tests/50federation/38receipts.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/50federation/38receipts.pl b/tests/50federation/38receipts.pl index 6d826f733..464a514ae 100644 --- a/tests/50federation/38receipts.pl +++ b/tests/50federation/38receipts.pl @@ -8,15 +8,20 @@ do => sub { my ( $creator_user, $room_id, $federated_user_id, $outbound_client, $inbound_server ) = @_; - my $event_id; + my ( $event_id, $room ); $outbound_client->join_room( server_name => $creator_user->server_name, room_id => $room_id, user_id => $federated_user_id, )->then( sub { + ( $room ) = @_; + log_if_fail "Joined room $room_id"; + + # workaround for https://github.com/matrix-org/synapse/issues/6536 + $loop->delay_future( after => 0.5 ); + })->then( sub { # send a message from the federated user - my ( $room ) = @_; my $event = $room->create_and_insert_event( type => "m.room.message",