Skip to content

Commit c8c459d

Browse files
committed
fix: make tests fail instead of hang in case a request timed out
1 parent 0d0f336 commit c8c459d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

caddy/admin_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ func TestAutoScaleRegularThreadsOnAutomaticThreadLimit(t *testing.T) {
213213
wg.Add(requestsPerTry)
214214
for range requestsPerTry {
215215
go func() {
216+
defer wg.Done()
216217
tester.AssertGetResponse(endpoint, http.StatusOK, "slept for 2 ms and worked for 1000 iterations")
217-
wg.Done()
218218
}()
219219
}
220220
wg.Wait()

0 commit comments

Comments
 (0)