makes log tests go a little quicker
This commit is contained in:
@@ -10,8 +10,12 @@ namespace Umbraco.Tests.Logging
|
||||
public TimeSpan AppendDelay { get; set; }
|
||||
public int LoggedEventCount { get { return m_eventsList.Count; } }
|
||||
|
||||
public bool Cancel { get; set; }
|
||||
|
||||
protected override void Append(LoggingEvent loggingEvent)
|
||||
{
|
||||
if (Cancel) return;
|
||||
|
||||
if (AppendDelay > TimeSpan.Zero)
|
||||
{
|
||||
Thread.Sleep(AppendDelay);
|
||||
|
||||
@@ -118,6 +118,8 @@ namespace Umbraco.Tests.Logging
|
||||
Assert.That(debugAppender.LoggedEventCount, Is.EqualTo(0));
|
||||
Assert.That(watch.ElapsedMilliseconds, Is.LessThan(testSize));
|
||||
Console.WriteLine("Logged {0} errors in {1}ms", testSize, watch.ElapsedMilliseconds);
|
||||
|
||||
debugAppender.Cancel = true;
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user