Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
beautifulentropy committed Oct 16, 2024
1 parent f2068b6 commit dc1a854
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions metrics/measured_http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,21 @@ func TestMeasuring(t *testing.T) {
},
[]string{"endpoint", "method", "code"})

inFlightRequestsGauge := prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "in_flight_requests",
Help: "Tracks the number of WFE requests currently in flight, labeled by endpoint.",
},
[]string{"endpoint"},
)

mux := http.NewServeMux()
mux.Handle("/foo", sleepyHandler{clk})
mh := MeasuredHandler{
serveMux: mux,
clk: clk,
stat: stat,
serveMux: mux,
clk: clk,
stat: stat,
inFlightRequestsGauge: inFlightRequestsGauge,
}
mh.ServeHTTP(httptest.NewRecorder(), &http.Request{
URL: &url.URL{Path: "/foo"},
Expand Down

0 comments on commit dc1a854

Please sign in to comment.