fix :no syscall.Kill on windows #1474 (#1474)

This commit is contained in:
Edward 2020-04-08 17:50:44 +08:00 committed by GitHub
parent 1fbc056dd4
commit bc0dc2e509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,8 +115,9 @@ func TestService(t *testing.T) {
ch := make(chan os.Signal, 1) ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGTERM) signal.Notify(ch, syscall.SIGTERM)
p, _ := os.FindProcess(os.Getpid())
p.Signal(syscall.SIGTERM)
syscall.Kill(syscall.Getpid(), syscall.SIGTERM)
<-ch <-ch
select { select {