MCPcopy
hub / github.com/flyteorg/flyte / TestWithGoroutineLabel

Function TestWithGoroutineLabel

flytestdlib/contextutils/context_test.go:140–147  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestWithGoroutineLabel(t *testing.T) {
141 ctx := context.Background()
142 ctx = WithGoroutineLabel(ctx, "my_routine_123")
143 pprof.SetGoroutineLabels(ctx)
144 m := Values(ctx, RoutineLabelKey)
145 assert.Equal(t, 1, len(m))
146 assert.Equal(t, "my_routine_123", m[RoutineLabelKey.String()])
147}

Callers

nothing calls this directly

Calls 4

WithGoroutineLabelFunction · 0.85
ValuesFunction · 0.85
EqualMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected