Add outgoing audio packet interval option
This commit is contained in:
committed by
Brandon McGinty
parent
893908f9a1
commit
d338925da6
@@ -70,6 +70,22 @@ func TestNotificationExpansionIsSinglePassAndNotifyDoesNotBlock(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAudioIntervalDuration(t *testing.T) {
|
||||
for _, milliseconds := range []int{10, 20, 40, 60} {
|
||||
got, err := audioIntervalDuration(milliseconds)
|
||||
if err != nil {
|
||||
t.Errorf("audioIntervalDuration(%d): %v", milliseconds, err)
|
||||
continue
|
||||
}
|
||||
if got != time.Duration(milliseconds)*time.Millisecond {
|
||||
t.Errorf("audioIntervalDuration(%d) = %v", milliseconds, got)
|
||||
}
|
||||
}
|
||||
if _, err := audioIntervalDuration(30); err == nil {
|
||||
t.Fatal("audioIntervalDuration accepted unsupported duration")
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerAddressDefaultsPortWithoutBreakingIPv6(t *testing.T) {
|
||||
for input, want := range map[string]string{
|
||||
"server": "server:64738",
|
||||
|
||||
Reference in New Issue
Block a user