MCPcopy Create free account
hub / github.com/efficientgo/e2e / TestRunUtilSignal

Function TestRunUtilSignal

interactive/interactive_test.go:38–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestRunUtilSignal(t *testing.T) {
39 s := make(chan struct{})
40 go func() {
41 RunUntilSignal()
42 s <- struct{}{}
43 close(s)
44 }()
45
46 pid := os.Getpid()
47 testutil.Ok(t, runutil.Retry(200*time.Millisecond, context.Background().Done(), func() error {
48 testutil.Ok(t, syscall.Kill(pid, syscall.SIGHUP))
49 select {
50 case <-s:
51 return nil
52 default:
53 return errors.New("execution is still stopped")
54 }
55 }))
56}

Callers

nothing calls this directly

Calls 2

RunUntilSignalFunction · 0.85
KillMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…