add ctx to interfaces (#105)

* add ctx to interfaces

* use existing context
This commit is contained in:
David Colburn
2021-08-30 20:31:24 -05:00
committed by GitHub
parent 1e10d440c8
commit 1f1eea383f
17 changed files with 321 additions and 267 deletions
+4 -2
View File
@@ -1,13 +1,15 @@
package test
import (
"context"
"strings"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/livekit/livekit-server/pkg/testutils"
testclient "github.com/livekit/livekit-server/test/client"
"github.com/stretchr/testify/require"
)
func TestClientCouldConnect(t *testing.T) {
@@ -100,7 +102,7 @@ func TestSinglePublisher(t *testing.T) {
c3.Stop()
success = testutils.WithTimeout(t, "c3 is cleaned up as a subscriber", func() bool {
room := s.RoomManager().GetRoom(testRoom)
room := s.RoomManager().GetRoom(context.Background(), testRoom)
require.NotNil(t, room)
p := room.GetParticipant("c1")
+1 -1
View File
@@ -73,7 +73,7 @@ func TestWebhooks(t *testing.T) {
ts.ClearEvents()
// room closed
rm := server.RoomManager().GetRoom(testRoom)
rm := server.RoomManager().GetRoom(context.Background(), testRoom)
rm.Close()
testutils.WithTimeout(t, "webhook events room_finished", func() bool {
if ts.GetEvent(webhook.EventRoomFinished) == nil {