Skip to content

Commit

Permalink
Some tests can fail randomly (WriteDescendingRollingFile, WriteAscend…
Browse files Browse the repository at this point in the history
…ingStableBaseRollingFile) #75
  • Loading branch information
VitaliyMF committed Nov 18, 2024
1 parent e975caa commit f26b3f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/NReco.Logging.Tests/FileProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public void WriteAscendingStableBaseRollingFile() {

for (int i = 0; i < 400; i++) {
logger.LogInformation("TEST 0123456789");
if (i % 20 == 0) {
System.Threading.Thread.Sleep(20); // give some time for log writer to handle the queue
if (i % 50 == 0) {
System.Threading.Thread.Sleep(50); // give some time for log writer to handle the queue
}
}
factory.Dispose();
Expand Down Expand Up @@ -203,8 +203,8 @@ public void WriteDescendingRollingFile() {

for (int i = 0; i < 400; i++) {
logger.LogInformation("TEST 0123456789");
if (i % 20 == 0) {
System.Threading.Thread.Sleep(20); // give some time for log writer to handle the queue
if (i % 50 == 0) {
System.Threading.Thread.Sleep(50); // give some time for log writer to handle the queue
}
}
factory.Dispose();
Expand All @@ -223,8 +223,8 @@ public void WriteDescendingRollingFile() {
createFactoryAndTestLogger();
for (int i = 0; i < 1000; i++) {
logger.LogInformation("TEST 0123456789");
if (i % 20 == 0) {
System.Threading.Thread.Sleep(20); // give some time for log writer to handle the queue
if (i % 50 == 0) {
System.Threading.Thread.Sleep(50); // give some time for log writer to handle the queue
}
}
factory.Dispose();
Expand Down

0 comments on commit f26b3f4

Please sign in to comment.