router: remove unused getCount from TestSingleflightDedup

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I22611938e3ef99a749905638288e4f9f6a6a6964
This commit is contained in:
raf 2026-03-06 21:23:16 +03:00
commit f100342720
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -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")
}