Skip to content

Commit

Permalink
Attempt to deflake a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Feb 28, 2020
1 parent 128d7d3 commit 5b1960d
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions tests/30rooms/13guestaccess.pl
Original file line number Diff line number Diff line change
Expand Up @@ -172,26 +172,28 @@
displayname => "creeper",
},
)})->then( sub {
Future->needs_all(
do_request_json_for( $guest_user,
method => "GET",
uri => $displayname_uri,
)->then( sub {
my ( $body ) = @_;
assert_eq( $body->{displayname}, "creeper", "Profile displayname" );

Future->done(1);
}),
do_request_json_for( $guest_user,
method => "GET",
uri => "/r0/rooms/$room_id/state/m.room.member/:user_id",
)->then( sub {
my ( $body ) = @_;
assert_eq( $body->{displayname}, "creeper", "Room displayname" );

Future->done(1);
}),
);
repeat_until_true {
Future->needs_all(
do_request_json_for( $guest_user,
method => "GET",
uri => $displayname_uri,
)->then( sub {
my ( $body ) = @_;
assert_eq( $body->{displayname}, "creeper", "Profile displayname" );

Future->done(1);
}),
do_request_json_for( $guest_user,
method => "GET",
uri => "/r0/rooms/$room_id/state/m.room.member/:user_id",
)->then( sub {
my ( $body ) = @_;
assert_eq( $body->{displayname}, "creeper", "Room displayname" );

Future->done(1);
}),
);
}
});
};

Expand Down

0 comments on commit 5b1960d

Please sign in to comment.