mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
Better check against internal server error exceptions during unit tests.
This commit is contained in:
parent
67298d62a0
commit
11db27f6ac
4 changed files with 11 additions and 9 deletions
|
@ -78,19 +78,18 @@ namespace NzbDrone.Test.Common
|
|||
{
|
||||
var inconclusiveLogs = _logs.Where(l => l.Exception != null && l.Exception.GetType() == exception).ToList();
|
||||
|
||||
if (inconclusiveLogs.Count != 0)
|
||||
if (inconclusiveLogs.Any())
|
||||
{
|
||||
inconclusiveLogs.ForEach(c => _logs.Remove(c));
|
||||
Assert.Inconclusive(GetLogsString(inconclusiveLogs));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void MarkInconclusive(string text)
|
||||
{
|
||||
var inconclusiveLogs = _logs.Where(l => l.FormattedMessage.Contains(text)).ToList();
|
||||
var inconclusiveLogs = _logs.Where(l => l.FormattedMessage.ToLower().Contains(text.ToLower())).ToList();
|
||||
|
||||
if (inconclusiveLogs.Count != 0)
|
||||
if (inconclusiveLogs.Any())
|
||||
{
|
||||
inconclusiveLogs.ForEach(c => _logs.Remove(c));
|
||||
Assert.Inconclusive(GetLogsString(inconclusiveLogs));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue