reset retries after stable playback

This commit is contained in:
Dmitry Sergeev
2026-08-27 09:44:14 +03:00
parent 418d0fc102
commit 8cb2d0b88f
3 changed files with 102 additions and 26 deletions
+14 -1
View File
@@ -20,8 +20,21 @@ func TestStatusPreservesValues(t *testing.T) {
if status.Unit != UnitVideo {
t.Errorf("Unit = %v, want %v", status.Unit, UnitVideo)
}
// Check the remaining fields similarly.
if !errors.Is(status.Err, wantErr) {
t.Errorf("Err = %v, want %v", status.Err, wantErr)
}
if status.State != StateReconnecting {
t.Errorf("State = %v, want %v", status.State, StateReconnecting)
}
if status.Attempt != 2 {
t.Errorf("Attempt = %d, want 2", status.Attempt)
}
if status.FailedAttempts != 1 {
t.Errorf("FailedAttempts = %d, want 1", status.FailedAttempts)
}
if status.RetryIn != time.Second {
t.Errorf("RetryIn = %s, want %s", status.RetryIn, time.Second)
}
}