Skip to content

Commit

Permalink
Added sleep to avoid race condition in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Janos Pasztor committed Mar 29, 2021
1 parent 11a0bfa commit 951e21a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wait_signal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"syscall"
"testing"
"time"
)

func TestWaitSignal(t *testing.T) {
Expand All @@ -31,6 +32,7 @@ func TestWaitSignal(t *testing.T) {
if err != nil {
t.Fatal(err)
}
time.Sleep(time.Second)
if err := p.Signal(syscall.SIGINT); err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 951e21a

Please sign in to comment.