reset retries after stable playback
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user