Add some tests and fix some miscellaneous bugs (#22836)
* Add some tests and fix some bugs * Add more helper methods * remove submodule * fix merge * also fix DirtyAll() * poke
This commit is contained in:
@@ -36,8 +36,15 @@ public sealed class PoolTestLogHandler : ILogHandler
|
||||
_prefix = prefix != null ? $"{prefix}: " : "";
|
||||
}
|
||||
|
||||
public bool ShuttingDown;
|
||||
|
||||
public void Log(string sawmillName, LogEvent message)
|
||||
{
|
||||
var level = message.Level.ToRobust();
|
||||
|
||||
if (ShuttingDown && (FailureLevel == null || level < FailureLevel))
|
||||
return;
|
||||
|
||||
if (ActiveContext is not { } testContext)
|
||||
{
|
||||
// If this gets hit it means something is logging to this instance while it's "between" tests.
|
||||
@@ -45,7 +52,6 @@ public sealed class PoolTestLogHandler : ILogHandler
|
||||
throw new InvalidOperationException("Log to pool test log handler without active test context");
|
||||
}
|
||||
|
||||
var level = message.Level.ToRobust();
|
||||
var name = LogMessage.LogLevelToName(level);
|
||||
var seconds = _stopwatch.Elapsed.TotalSeconds;
|
||||
var rendered = message.RenderMessage();
|
||||
|
||||
Reference in New Issue
Block a user