Skip to content

Commit

Permalink
Fix a flaky cross-signing test (#749)
Browse files Browse the repository at this point in the history
The basic problem in this test is that there are three things that can cause a
"devices/changed" sync update:
 * inviting the user
 * the user joining
 * the user doing his cross-signing

... and it's hard to be sure that we're getting the right update. If we make
sure that we wait for each update, it fixes the race condition.
  • Loading branch information
richvdh authored Nov 26, 2019
1 parent 54e81cb commit 281a76c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/41end-to-end-keys/08-cross-signing.pl
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,11 @@
matrix_create_room( $user1 );
})->then( sub {
( $room_id ) = @_;

matrix_sync( $user1 );
})->then( sub {
matrix_invite_user_to_room( $user1, $user2, $room_id )
})->then( sub {
matrix_sync( $user1 );
sync_until_user_in_device_list( $user1, $user2 );
})->then( sub {
matrix_join_room( $user2, $room_id );
})->then( sub {
Expand Down

0 comments on commit 281a76c

Please sign in to comment.