Skip to content

Commit

Permalink
Integration Tests: change 1ms sleeps to 50ms
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nshalman committed Jan 20, 2022
1 parent ebaf806 commit d81b73a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions integration_test.go
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit d81b73a

Please sign in to comment.