Skip to content

Commit

Permalink
Make message history pagination test less flaky (#851)
Browse files Browse the repository at this point in the history
* Make message history pagination test less flaky

* Use await_sync_timeline_contains
  • Loading branch information
Cnly authored Apr 14, 2020
1 parent a73554a commit 034199d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/30rooms/04messages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@
body => "Message number $_[0]"
)
} foreach => [ 1 .. 20 ] )->then( sub {
await_sync_timeline_contains(
$user, $room_id, check => sub {
any {
$_->{type} eq "m.room.message"
&& $_->{content}{body} eq "Message number 20"
} @_;
},
);
})->then( sub {
matrix_get_room_messages( $user, $room_id, limit => 5 )
})->then( sub {
my ( $body ) = @_;
Expand Down

0 comments on commit 034199d

Please sign in to comment.