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

Function TestRunUntilEndpointHit_Signal

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

Source from the content-addressed store, hash-verified

16)
17
18func TestRunUntilEndpointHit_Signal(t *testing.T) {
19 s := make(chan struct{})
20 go func() {
21 testutil.Ok(t, RunUntilEndpointHit())
22 s <- struct{}{}
23 close(s)
24 }()
25
26 pid := os.Getpid()
27 testutil.Ok(t, runutil.Retry(200*time.Millisecond, context.Background().Done(), func() error {
28 testutil.Ok(t, syscall.Kill(pid, syscall.SIGHUP))
29 select {
30 case <-s:
31 return nil
32 default:
33 return errors.New("execution is still stopped")
34 }
35 }))
36}
37
38func TestRunUtilSignal(t *testing.T) {
39 s := make(chan struct{})

Callers

nothing calls this directly

Calls 2

RunUntilEndpointHitFunction · 0.85
KillMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…