From 8b33f88cd0c9f63e070f47b18e89af3f67c263e1 Mon Sep 17 00:00:00 2001 From: Nahum Shalman Date: Thu, 20 Jan 2022 01:20:43 +0000 Subject: [PATCH] Integration Tests: change 1ms sleeps to 50ms When testing the FEN code repeatedly and under system load I can sometimes get these tests to fail with a missed WRITE event. With these longer sleeps I have been unable to produce any test failures. --- integration_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration_test.go b/integration_test.go index 19211e80..ec18e03e 100644 --- a/integration_test.go +++ b/integration_test.go @@ -135,7 +135,7 @@ func TestFsnotifyMultipleOperations(t *testing.T) { } f.Sync() - time.Sleep(time.Millisecond) + time.Sleep(50 * time.Millisecond) f.WriteString("data") f.Sync() f.Close() @@ -248,7 +248,7 @@ func TestFsnotifyMultipleCreates(t *testing.T) { } f.Sync() - time.Sleep(time.Millisecond) + time.Sleep(50 * time.Millisecond) f.WriteString("data") f.Sync() f.Close() @@ -274,7 +274,7 @@ func TestFsnotifyMultipleCreates(t *testing.T) { } f.Sync() - time.Sleep(time.Millisecond) + time.Sleep(50 * time.Millisecond) f.WriteString("data") f.Sync() f.Close() @@ -288,7 +288,7 @@ func TestFsnotifyMultipleCreates(t *testing.T) { } f.Sync() - time.Sleep(time.Millisecond) + time.Sleep(50 * time.Millisecond) f.WriteString("data") f.Sync() f.Close() @@ -387,7 +387,7 @@ func TestFsnotifyDirOnly(t *testing.T) { } f.Sync() - time.Sleep(time.Millisecond) + time.Sleep(50 * time.Millisecond) f.WriteString("data") f.Sync() f.Close()