Skip to content

Commit f26b3f4

Browse files
committed
Some tests can fail randomly (WriteDescendingRollingFile, WriteAscendingStableBaseRollingFile) nreco#75
1 parent e975caa commit f26b3f4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/NReco.Logging.Tests/FileProviderTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ public void WriteAscendingStableBaseRollingFile() {
148148

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

204204
for (int i = 0; i < 400; i++) {
205205
logger.LogInformation("TEST 0123456789");
206-
if (i % 20 == 0) {
207-
System.Threading.Thread.Sleep(20); // give some time for log writer to handle the queue
206+
if (i % 50 == 0) {
207+
System.Threading.Thread.Sleep(50); // give some time for log writer to handle the queue
208208
}
209209
}
210210
factory.Dispose();
@@ -223,8 +223,8 @@ public void WriteDescendingRollingFile() {
223223
createFactoryAndTestLogger();
224224
for (int i = 0; i < 1000; i++) {
225225
logger.LogInformation("TEST 0123456789");
226-
if (i % 20 == 0) {
227-
System.Threading.Thread.Sleep(20); // give some time for log writer to handle the queue
226+
if (i % 50 == 0) {
227+
System.Threading.Thread.Sleep(50); // give some time for log writer to handle the queue
228228
}
229229
}
230230
factory.Dispose();

0 commit comments

Comments
 (0)