(t *testing.T)
| 104 | } |
| 105 | |
| 106 | func 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 | } |
nothing calls this directly
no test coverage detected