router: remove unused getCount from TestSingleflightDedup
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I22611938e3ef99a749905638288e4f9f6a6a6964
This commit is contained in:
parent
41b18dd1f8
commit
f100342720
1 changed files with 1 additions and 2 deletions
|
|
@ -178,14 +178,13 @@ func TestResolveWithDownUpstream(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestSingleflightDedup(t *testing.T) {
|
||||
var headCount, getCount int32
|
||||
var headCount int32
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method == http.MethodHead {
|
||||
atomic.AddInt32(&headCount, 1)
|
||||
time.Sleep(30 * time.Millisecond) // ensure goroutines overlap
|
||||
w.WriteHeader(http.StatusOK)
|
||||
} else {
|
||||
atomic.AddInt32(&getCount, 1)
|
||||
w.Header().Set("Content-Type", "text/x-nix-narinfo")
|
||||
fmt.Fprintln(w, "StorePath: /nix/store/abc123-test")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue