MCPcopy Create free account
hub / github.com/crewjam/saml / TestLinksConcurrentAccess

Function TestLinksConcurrentAccess

example/service_test.go:106–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

104}
105
106func TestLinksConcurrentAccess(t *testing.T) {
107 resetLinks(t)
108 var wg sync.WaitGroup
109 for i := 0; i < 20; i++ {
110 wg.Add(2)
111 go func() {
112 defer wg.Done()
113 createLink(t, "https://example.com/", "alice")
114 }()
115 go func() {
116 defer wg.Done()
117 ListLinks(httptest.NewRecorder(), requestAs(http.MethodGet, "", "alice"))
118 }()
119 }
120 wg.Wait()
121}

Callers

nothing calls this directly

Calls 4

resetLinksFunction · 0.85
createLinkFunction · 0.85
ListLinksFunction · 0.85
requestAsFunction · 0.85

Tested by

no test coverage detected