Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d493df0b7 | ||
|
|
9ea00f51b0 |
@@ -9,7 +9,6 @@ import (
|
||||
"net/http/httptest"
|
||||
"slices"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/go-chi/chi/v5/middleware"
|
||||
"sneak.berlin/go/pixa/internal/httpfetcher"
|
||||
@@ -102,10 +101,8 @@ func TestImageRoutes_ClientGoneAnswers499(t *testing.T) {
|
||||
ctx, http.MethodGet, target, nil))
|
||||
}()
|
||||
|
||||
// Give the second request time to start waiting for the first
|
||||
// request's image. The fetch is still held, so the second request
|
||||
// can end only because its client went away
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
// The fetch is still held, so the second request can end only
|
||||
// because its client went away
|
||||
cancel()
|
||||
<-secondDone
|
||||
|
||||
|
||||
Reference in New Issue
Block a user