Fixed: Flaky Housekeeper Tests

This commit is contained in:
Qstick 2017-11-16 13:35:11 -05:00
parent 4f6415b0e5
commit 26935bd82f
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using FizzWare.NBuilder; using FizzWare.NBuilder;
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.Housekeeping.Housekeepers
Mocker.GetMock<IDownloadClientStatusRepository>() Mocker.GetMock<IDownloadClientStatusRepository>()
.Verify(v => v.UpdateMany( .Verify(v => v.UpdateMany(
It.Is<List<DownloadClientStatus>>(i => i.All( It.Is<List<DownloadClientStatus>>(i => i.All(
s => s.InitialFailure.Value < DateTime.UtcNow)) s => s.InitialFailure.Value <= DateTime.UtcNow))
) )
); );
} }
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Test.Housekeeping.Housekeepers
Mocker.GetMock<IDownloadClientStatusRepository>() Mocker.GetMock<IDownloadClientStatusRepository>()
.Verify(v => v.UpdateMany( .Verify(v => v.UpdateMany(
It.Is<List<DownloadClientStatus>>(i => i.All( It.Is<List<DownloadClientStatus>>(i => i.All(
s => s.MostRecentFailure.Value < DateTime.UtcNow)) s => s.MostRecentFailure.Value <= DateTime.UtcNow))
) )
); );
} }

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using FizzWare.NBuilder; using FizzWare.NBuilder;
@ -60,7 +60,7 @@ namespace NzbDrone.Core.Test.Housekeeping.Housekeepers
Mocker.GetMock<IIndexerStatusRepository>() Mocker.GetMock<IIndexerStatusRepository>()
.Verify(v => v.UpdateMany( .Verify(v => v.UpdateMany(
It.Is<List<IndexerStatus>>(i => i.All( It.Is<List<IndexerStatus>>(i => i.All(
s => s.InitialFailure.Value < DateTime.UtcNow)) s => s.InitialFailure.Value <= DateTime.UtcNow))
) )
); );
} }
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Test.Housekeeping.Housekeepers
Mocker.GetMock<IIndexerStatusRepository>() Mocker.GetMock<IIndexerStatusRepository>()
.Verify(v => v.UpdateMany( .Verify(v => v.UpdateMany(
It.Is<List<IndexerStatus>>(i => i.All( It.Is<List<IndexerStatus>>(i => i.All(
s => s.MostRecentFailure.Value < DateTime.UtcNow)) s => s.MostRecentFailure.Value <= DateTime.UtcNow))
) )
); );
} }