Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sigctx

import (
"context"
"fmt"
"os"
"runtime"
"sync"
Expand All @@ -26,7 +27,7 @@ func TestWithSignals(t *testing.T) {
time.Sleep(time.Millisecond * 100)
p, err := os.FindProcess(pid)
if err != nil {
t.Fatal("Failed to get pid")
panic(fmt.Sprint("Failed to get pid"))
}
if err := p.Signal(syscall.SIGUSR1); err != nil {
t.Error(err.Error())
Expand Down Expand Up @@ -106,7 +107,7 @@ func TestWithCancelSignals(t *testing.T) {
time.Sleep(time.Millisecond * 200)
p, err := os.FindProcess(pid)
if err != nil {
t.Fatal("Failed to get pid")
panic(fmt.Sprint("Failed to get pid"))
}
p.Signal(syscall.SIGUSR1)
time.Sleep(time.Second * 3)
Expand Down