MCPcopy
hub / github.com/cloudflare/tableflip / TestChildKill

Function TestChildKill

child_test.go:23–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21}
22
23func TestChildKill(t *testing.T) {
24 env, procs := testEnv()
25
26 child, err := startChild(env, nil)
27 if err != nil {
28 t.Fatal(err)
29 }
30
31 proc := <-procs
32
33 go child.Kill()
34 if sig := proc.recvSignal(nil); sig != os.Kill {
35 t.Errorf("Received %v instead of os.Kill", sig)
36 }
37
38 proc.exit(nil)
39}
40
41func TestChildNotReady(t *testing.T) {
42 env, procs := testEnv()

Callers

nothing calls this directly

Calls 5

testEnvFunction · 0.85
startChildFunction · 0.85
KillMethod · 0.80
recvSignalMethod · 0.80
exitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…