From f26b3f46993a4a4955022d5861f0f51fcaffab32 Mon Sep 17 00:00:00 2001 From: Vitalii Fedorchenko Date: Mon, 18 Nov 2024 15:27:31 +0200 Subject: [PATCH] Some tests can fail randomly (WriteDescendingRollingFile, WriteAscendingStableBaseRollingFile) #75 --- test/NReco.Logging.Tests/FileProviderTests.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/NReco.Logging.Tests/FileProviderTests.cs b/test/NReco.Logging.Tests/FileProviderTests.cs index ce73a58..fcad93a 100644 --- a/test/NReco.Logging.Tests/FileProviderTests.cs +++ b/test/NReco.Logging.Tests/FileProviderTests.cs @@ -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(); @@ -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(); @@ -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();