Move callbacks out of messageRouter (#269)

* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
This commit is contained in:
David Colburn
2021-12-17 13:19:23 -08:00
committed by GitHub
parent a06edd885e
commit faa870de3d
82 changed files with 315 additions and 527 deletions
+5 -4
View File
@@ -5,10 +5,11 @@ import (
"testing"
"time"
"github.com/livekit/livekit-server/pkg/telemetry"
"github.com/livekit/livekit-server/pkg/telemetry/telemetryfakes"
"github.com/livekit/protocol/livekit"
"github.com/stretchr/testify/require"
"github.com/livekit/livekit-server/pkg/telemetry"
"github.com/livekit/livekit-server/pkg/telemetry/telemetryfakes"
)
type telemetryServiceFixture struct {
@@ -23,7 +24,7 @@ func createFixture() *telemetryServiceFixture {
return fixture
}
func Test_TelemetrySerice_Downstream_Stats(t *testing.T) {
func Test_TelemetryService_Downstream_Stats(t *testing.T) {
fixture := createFixture()
room := &livekit.Room{}
@@ -33,7 +34,7 @@ func Test_TelemetrySerice_Downstream_Stats(t *testing.T) {
totalBytes := 33
fixture.sut.OnDownstreamPacket(partSID, totalBytes)
//call participant left to trigget sending of analytics
// call participant left to trigget sending of analytics
fixture.sut.ParticipantLeft(context.Background(), room, participantInfo)
time.Sleep(time.Millisecond * 100) // wait for Update function to be called in go routine