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

Function TestChildNotReady

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

Source from the content-addressed store, hash-verified

39}
40
41func TestChildNotReady(t *testing.T) {
42 env, procs := testEnv()
43
44 child, err := startChild(env, nil)
45 if err != nil {
46 t.Fatal(err)
47 }
48
49 proc := <-procs
50 proc.exit(nil)
51 <-child.result
52 <-child.exited
53
54 select {
55 case <-child.ready:
56 t.Error("Child signals readiness without pipe being closed")
57 default:
58 }
59}
60
61func TestChildReady(t *testing.T) {
62 env, procs := testEnv()

Callers

nothing calls this directly

Calls 3

testEnvFunction · 0.85
startChildFunction · 0.85
exitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…