MCPcopy
hub / github.com/derailed/k9s / TestParallelRenderError

Function TestParallelRenderError

internal/model1/helpers_test.go:174–183  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

172}
173
174func TestParallelRenderError(t *testing.T) {
175 err := parallelRender(50, func(i int) error {
176 if i == 25 {
177 return fmt.Errorf("boom at %d", i)
178 }
179 return nil
180 })
181 require.Error(t, err)
182 assert.Contains(t, err.Error(), "boom")
183}
184
185func BenchmarkParallelRender(b *testing.B) {
186 const n = 50_000

Callers

nothing calls this directly

Calls 2

parallelRenderFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…