Skip to content

Commit 2fa02b7

Browse files
Remove assertion for partway writing of the file, keeping just the end result (all 10 lines written).
1 parent fbfc045 commit 2fa02b7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

DockerComposeFixture.Tests/Logging/LoggerTests.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.IO;
33
using System.Linq;
4-
using System.Threading;
54
using System.Threading.Tasks;
65
using DockerComposeFixture.Logging;
76
using DockerComposeFixture.Tests.Utils;
@@ -36,13 +35,10 @@ int GetFileLineCount(string file)
3635
}
3736

3837
var task = new Task(() => counter.Count(delay: 10));
39-
4038
task.Start();
41-
Thread.Sleep(50);
42-
var fileLineCount = GetFileLineCount(tmpFile);
43-
fileLineCount.Should().BeInRange(1, 9);
4439
await task;
45-
fileLineCount = GetFileLineCount(tmpFile);
40+
41+
var fileLineCount = GetFileLineCount(tmpFile);
4642
fileLineCount.Should().Be(10);
4743
var lines = File.ReadAllLines(tmpFile);
4844
lines.Should().BeEquivalentTo("1,2,3,4,5,6,7,8,9,10".Split(","));

0 commit comments

Comments
 (0)