MCPcopy
hub / github.com/etcd-io/etcd / FatalStack

Function FatalStack

client/pkg/testutil/testutil.go:55–62  ·  view source on GitHub ↗

FatalStack helps to fatal the test and print out the stacks of all running goroutines.

(t *testing.T, s string)

Source from the content-addressed store, hash-verified

53
54// FatalStack helps to fatal the test and print out the stacks of all running goroutines.
55func FatalStack(t *testing.T, s string) {
56 t.Helper()
57 stackTrace := make([]byte, 1024*1024)
58 n := runtime.Stack(stackTrace, true)
59 t.Errorf("---> Test failed: %s", s)
60 t.Error(string(stackTrace[:n]))
61 t.Fatal(s)
62}
63
64// ConditionFunc returns true when a condition is met.
65type ConditionFunc func() (bool, error)

Callers

nothing calls this directly

Calls 4

HelperMethod · 0.65
ErrorfMethod · 0.65
ErrorMethod · 0.65
FatalMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…