eat There is no currently active test (#770)
This commit is contained in:
@@ -84,6 +84,8 @@ namespace k8s.Tests.Logging
|
|||||||
throw new ArgumentNullException(nameof(formatter));
|
throw new ArgumentNullException(nameof(formatter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
TestOutput.WriteLine(string.Format(
|
TestOutput.WriteLine(string.Format(
|
||||||
"[{0}] {1}: {2}",
|
"[{0}] {1}: {2}",
|
||||||
level,
|
level,
|
||||||
@@ -96,6 +98,20 @@ namespace k8s.Tests.Logging
|
|||||||
exception.ToString());
|
exception.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (AggregateException e)
|
||||||
|
{
|
||||||
|
// ignore 'There is no currently active test.'
|
||||||
|
foreach (var inner in e.InnerExceptions)
|
||||||
|
{
|
||||||
|
if (inner.Message.Contains("There is no currently active test"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if the given <paramref name="logLevel"/> is enabled.
|
/// Check if the given <paramref name="logLevel"/> is enabled.
|
||||||
|
|||||||
Reference in New Issue
Block a user