mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 04:07:47 +08:00
fix: uint testing case for signal feature of package gproc occasionally failed (#3529)
This commit is contained in:
parent
1013df1627
commit
adc94fd97a
@ -7,11 +7,12 @@
|
||||
package gproc
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"os"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
)
|
||||
|
||||
func Test_Signal(t *testing.T) {
|
||||
@ -79,6 +80,9 @@ func Test_Signal(t *testing.T) {
|
||||
})
|
||||
|
||||
sendSignal(syscall.SIGTERM)
|
||||
// wait the listen done
|
||||
time.Sleep(time.Second)
|
||||
|
||||
select {
|
||||
case s := <-sigRec:
|
||||
t.AssertEQ(s, syscall.SIGTERM)
|
||||
|
Loading…
Reference in New Issue
Block a user