imports/inspections
This commit is contained in:
@@ -4,9 +4,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/protocol/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/utils"
|
||||
)
|
||||
|
||||
// a router of messages on the same node, basic implementation for local testing
|
||||
@@ -121,7 +122,6 @@ func (r *LocalRouter) Start() error {
|
||||
}
|
||||
|
||||
func (r *LocalRouter) Stop() {
|
||||
|
||||
r.rtcMessageChan.Close()
|
||||
}
|
||||
|
||||
|
||||
@@ -156,8 +156,7 @@ func (t *DataTrack) forwardWorker() {
|
||||
for _, sub := range t.subscribers {
|
||||
err := sub.SendMessage(msg)
|
||||
if err != nil {
|
||||
logger.Errorw("could not send data message",
|
||||
err,
|
||||
logger.Errorw("could not send data message", err,
|
||||
"source", t.participantId,
|
||||
"dest", sub.participantId)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Code generated by Wire. DO NOT EDIT.
|
||||
|
||||
//go:generate wire
|
||||
//go:generate go run github.com/google/wire/cmd/wire
|
||||
//+build !wireinject
|
||||
|
||||
package service
|
||||
|
||||
@@ -9,17 +9,17 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
testclient "github.com/livekit/livekit-server/test/client"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/twitchtv/twirp"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/logger"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/livekit-server/pkg/service"
|
||||
"github.com/livekit/livekit-server/pkg/testutils"
|
||||
livekit "github.com/livekit/livekit-server/proto"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/utils"
|
||||
testclient "github.com/livekit/livekit-server/test/client"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -112,7 +112,6 @@ func waitForServerToStart(s *service.LivekitServer) {
|
||||
func waitUntilConnected(t *testing.T, clients ...*testclient.RTCClient) {
|
||||
logger.Infow("waiting for clients to become connected")
|
||||
wg := sync.WaitGroup{}
|
||||
errChan := make(chan error, len(clients))
|
||||
for i := range clients {
|
||||
c := clients[i]
|
||||
wg.Add(1)
|
||||
@@ -120,15 +119,13 @@ func waitUntilConnected(t *testing.T, clients ...*testclient.RTCClient) {
|
||||
defer wg.Done()
|
||||
err := c.WaitUntilConnected()
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
t.Error(err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
wg.Wait()
|
||||
close(errChan)
|
||||
for err := range errChan {
|
||||
t.Fatal(err)
|
||||
if t.Failed() {
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user