Skip to content

Commit

Permalink
longer timeout for async tests
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 6, 2023
1 parent 02ecf6e commit 571fddc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/bot/file_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ func TestWatch(t *testing.T) {
return nil
}

time.AfterFunc(time.Millisecond*100, func() {
time.Sleep(time.Millisecond * 100)
time.AfterFunc(time.Millisecond*200, func() {
_, err = tmpfile.WriteString("hello world")
require.NoError(t, err)
tmpfile.Close()
Expand Down Expand Up @@ -79,7 +78,7 @@ func TestWatchPair_bothFilesChanged(t *testing.T) {
return nil
}

time.AfterFunc(time.Millisecond*100, func() {
time.AfterFunc(time.Millisecond*200, func() {
_, err = tmpfile1.WriteString("hello world 1")
require.NoError(t, err)
tmpfile1.Close()
Expand Down Expand Up @@ -128,7 +127,7 @@ func TestWatchPair_oneFileChanged(t *testing.T) {
return nil
}

time.AfterFunc(time.Millisecond*100, func() {
time.AfterFunc(time.Millisecond*200, func() {
_, err = tmpfile1.WriteString("hello world 1")
require.NoError(t, err)
tmpfile1.Close()
Expand Down

0 comments on commit 571fddc

Please sign in to comment.