Make TelemetryService testable (#276)
* Make TelemetryService testable Timer is extracted for better testability of telemetryservice. Divided TelemetryService to internal part that: - contains business logic - does not contain timer - and therefore testable and external part that: - does not contain business logic - contains timer to send analytics every 10 seconds for all participants. - does not need tests * Add Test_AnalyticsSentWhenParticipantLeaves * Fix test
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/pion/rtcp"
|
||||
)
|
||||
|
||||
func (t *telemetryService) NewStatsInterceptorFactory(participantID, identity string) *StatsInterceptorFactory {
|
||||
func (t *telemetryServiceInternal) NewStatsInterceptorFactory(participantID, identity string) *StatsInterceptorFactory {
|
||||
return &StatsInterceptorFactory{
|
||||
t: t,
|
||||
participantID: participantID,
|
||||
|
||||
Reference in New Issue
Block a user