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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user