mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-12 11:15:43 +02:00
parent
58d841c463
commit
44d8dbaac8
@ -68,5 +68,16 @@ public void should_not_store_update_if_already_okay()
|
||||
|
||||
VerifyNoUpdate();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_record_failure_for_unknown_provider()
|
||||
{
|
||||
Subject.RecordFailure(0);
|
||||
|
||||
Mocker.GetMock<IIndexerStatusRepository>()
|
||||
.Verify(v => v.FindByProviderId(1), Times.Never);
|
||||
|
||||
VerifyNoUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,6 +79,11 @@ public virtual void RecordSuccess(int providerId)
|
||||
|
||||
protected virtual void RecordFailure(int providerId, TimeSpan minimumBackOff, bool escalate)
|
||||
{
|
||||
if (providerId <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lock (_syncRoot)
|
||||
{
|
||||
var status = GetProviderStatus(providerId);
|
||||
|
Loading…
Reference in New Issue
Block a user