chore: fix lint errors (#2520)
This commit is contained in:
@@ -32,13 +32,13 @@ func TestMaxConnsHandler(t *testing.T) {
|
||||
|
||||
for i := 0; i < conns; i++ {
|
||||
go func() {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", nil)
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", http.NoBody)
|
||||
handler.ServeHTTP(httptest.NewRecorder(), req)
|
||||
}()
|
||||
}
|
||||
|
||||
waitGroup.Wait()
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", nil)
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", http.NoBody)
|
||||
resp := httptest.NewRecorder()
|
||||
handler.ServeHTTP(resp, req)
|
||||
assert.Equal(t, http.StatusServiceUnavailable, resp.Code)
|
||||
@@ -65,14 +65,14 @@ func TestWithoutMaxConnsHandler(t *testing.T) {
|
||||
|
||||
for i := 0; i < conns; i++ {
|
||||
go func() {
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", nil)
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", http.NoBody)
|
||||
req.Header.Set(key, value)
|
||||
handler.ServeHTTP(httptest.NewRecorder(), req)
|
||||
}()
|
||||
}
|
||||
|
||||
waitGroup.Wait()
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", nil)
|
||||
req := httptest.NewRequest(http.MethodGet, "http://localhost", http.NoBody)
|
||||
resp := httptest.NewRecorder()
|
||||
handler.ServeHTTP(resp, req)
|
||||
assert.Equal(t, http.StatusOK, resp.Code)
|
||||
|
||||
Reference in New Issue
Block a user