Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Events come down the correct room' #1057

Merged
merged 1 commit into from
Jun 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions tests/90jira/SYN-627.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,27 @@
})->then( sub {
matrix_sync( $user );
})->then( sub {
# send messages into all but the last room.
Future->needs_all( map {
my $room_id = $_;

matrix_send_room_text_message( $user, $room_id, body => "$room_id" );
} @rooms[0 .. @rooms - 2] );
} @rooms );
})->then( sub {
# send a message into the last room
matrix_send_room_text_message_synced( $user, $rooms[-1], body => $rooms[-1] );
# Wait until we see all rooms come down the sync stream.
retry_until_success {
matrix_sync(
$user, since => $user->sync_next_batch, update_next_batch => 0
)->then( sub {
my ( $body ) = @_;

foreach my $room_id ( @rooms ) {
my $room = $body->{rooms}{join}{$room_id};

assert_json_keys( $room, qw( timeline ));
@{ $room->{timeline}{events} } == 1 or die "Expected exactly one event";
}
})
}
})->then( sub {
matrix_sync_again( $user );
})->then( sub {
Expand Down