Skip to content

Commit 6c8b67a

Browse files
niemyjskiejsmith
authored andcommitted
Updates to log flush test
1 parent c5b6eae commit 6c8b67a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

test/Exceptionless.Tests/Log/FileExceptionlessLogTestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public virtual void CanWriteToLogFile() {
2222
}
2323
}
2424

25-
public virtual void LogFlushTimerWorks() {
25+
public virtual async Task LogFlushTimerWorks() {
2626
DeleteLog();
2727

2828
using (var log = GetLog(LOG_FILE)) {
@@ -31,7 +31,7 @@ public virtual void LogFlushTimerWorks() {
3131
string contents = log.GetFileContents();
3232
Assert.Equal("", contents);
3333

34-
Thread.Sleep(1010 * 3);
34+
await Task.Delay(TimeSpan.FromMilliseconds(3050));
3535

3636
Assert.True(LogExists(log.FilePath));
3737
contents = log.GetFileContents();

test/Exceptionless.Tests/Log/FileExceptionlessLogTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.IO;
3+
using System.Threading.Tasks;
34
using Exceptionless.Logging;
45
using Xunit;
56

@@ -16,8 +17,8 @@ public override void CheckSizeDoesNotFailIfLogIsMissing() {
1617
}
1718

1819
[Fact]
19-
public override void LogFlushTimerWorks() {
20-
base.LogFlushTimerWorks();
20+
public override Task LogFlushTimerWorks() {
21+
return base.LogFlushTimerWorks();
2122
}
2223

2324
[Fact]

test/Exceptionless.Tests/Log/IsolatedStorageFileExceptionlessLogTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public override void CheckSizeDoesNotFailIfLogIsMissing() {
2828
}
2929

3030
[Fact]
31-
public override void LogFlushTimerWorks() {
32-
base.LogFlushTimerWorks();
31+
public override Task LogFlushTimerWorks() {
32+
return base.LogFlushTimerWorks();
3333
}
3434

3535
[Fact]

0 commit comments

Comments
 (0)