Add sleep between joining multiple clients to the same room.

This commit is contained in:
Joachim Bauch 2020-07-31 13:55:50 +02:00
parent b165c44080
commit 8772ea83fd
Failed to extract signature
2 changed files with 16 additions and 0 deletions

View File

@ -936,6 +936,10 @@ func TestBackendServer_ParticipantsUpdateTimeout(t *testing.T) {
} else if room.Room.RoomId != roomId {
t.Fatalf("Expected room %s, got %s", roomId, room.Room.RoomId)
}
// Give message processing some time.
time.Sleep(10 * time.Millisecond)
if room, err := client2.JoinRoom(ctx, roomId); err != nil {
t.Fatal(err)
} else if room.Room.RoomId != roomId {

View File

@ -1221,6 +1221,10 @@ func TestClientMessageToRoom(t *testing.T) {
} else if room.Room.RoomId != roomId {
t.Fatalf("Expected room %s, got %s", roomId, room.Room.RoomId)
}
// Give message processing some time.
time.Sleep(10 * time.Millisecond)
if room, err := client2.JoinRoom(ctx, roomId); err != nil {
t.Fatal(err)
} else if room.Room.RoomId != roomId {
@ -1665,6 +1669,10 @@ func TestRoomParticipantsListUpdateWhileDisconnected(t *testing.T) {
} else if room.Room.RoomId != roomId {
t.Fatalf("Expected room %s, got %s", roomId, room.Room.RoomId)
}
// Give message processing some time.
time.Sleep(10 * time.Millisecond)
if room, err := client2.JoinRoom(ctx, roomId); err != nil {
t.Fatal(err)
} else if room.Room.RoomId != roomId {
@ -1940,6 +1948,10 @@ func TestClientSendOfferPermissions(t *testing.T) {
} else if room.Room.RoomId != roomId {
t.Fatalf("Expected room %s, got %s", roomId, room.Room.RoomId)
}
// Give message processing some time.
time.Sleep(10 * time.Millisecond)
if room, err := client2.JoinRoom(ctx, roomId); err != nil {
t.Fatal(err)
} else if room.Room.RoomId != roomId {