MCPcopy
hub / github.com/caddyserver/caddy / TestLoadConcurrent

Function TestLoadConcurrent

admin_test.go:163–172  ·  view source on GitHub ↗

TestLoadConcurrent exercises Load under concurrent conditions and is most useful under test with `-race` enabled.

(t *testing.T)

Source from the content-addressed store, hash-verified

161// TestLoadConcurrent exercises Load under concurrent conditions
162// and is most useful under test with `-race` enabled.
163func TestLoadConcurrent(t *testing.T) {
164 var wg sync.WaitGroup
165
166 for i := 0; i < 100; i++ {
167 wg.Go(func() {
168 _ = Load(testCfg, true)
169 })
170 }
171 wg.Wait()
172}
173
174type fooModule struct {
175 IntField int

Callers

nothing calls this directly

Calls 1

LoadFunction · 0.85

Tested by

no test coverage detected