add FlakyAttribute to mark flaky tests (#1222)
part of aspnet/AspNetCore#8237
This commit is contained in:
parent
e9fd9d7ab3
commit
52be71db2b
|
|
@ -91,6 +91,14 @@ namespace Microsoft.Extensions.Logging.Testing
|
||||||
|
|
||||||
public virtual void Dispose()
|
public virtual void Dispose()
|
||||||
{
|
{
|
||||||
|
if(_testLog == null)
|
||||||
|
{
|
||||||
|
// It seems like sometimes the MSBuild goop that adds the test framework can end up in a bad state and not actually add it
|
||||||
|
// Not sure yet why that happens but the exception isn't clear so I'm adding this error so we can detect it better.
|
||||||
|
// -anurse
|
||||||
|
throw new InvalidOperationException("LoggedTest base class was used but nothing initialized it! The test framework may not be enabled. Try cleaning your 'obj' directory.");
|
||||||
|
}
|
||||||
|
|
||||||
_initializationException?.Throw();
|
_initializationException?.Throw();
|
||||||
_testLog.Dispose();
|
_testLog.Dispose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue