Skip to content

Commit de4602d

Browse files
committed
clients: fix bug in client setup
This commit fixes a bug introduced in recent release v1.2.1 Also fixes a test failing with newest version of Go (1.11) Updates #43.
1 parent 6491a5d commit de4602d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bombardier_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func TestBombardierHTTPCodeRecording(t *testing.T) {
157157
}
158158

159159
func testBombardierHTTPCodeRecording(clientType clientTyp, t *testing.T) {
160-
cs := []int{102, 200, 302, 404, 505, 606, 707}
160+
cs := []int{200, 302, 404, 505, 606, 707}
161161
codes := ring.New(len(cs))
162162
for _, v := range cs {
163163
codes.Value = v
@@ -202,7 +202,6 @@ func testBombardierHTTPCodeRecording(clientType clientTyp, t *testing.T) {
202202
expected uint64
203203
}{
204204
{"errored", b.others, eachCodeCount * 2},
205-
{"1xx", b.req1xx, eachCodeCount},
206205
{"2xx", b.req2xx, eachCodeCount},
207206
{"3xx", b.req3xx, eachCodeCount},
208207
{"4xx", b.req4xx, eachCodeCount},

clients.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func newFastHTTPClient(opts *clientOpts) client {
5353
panic(err)
5454
}
5555
c.host = u.Host
56-
c.requestURI = "/" + u.Path + "?" + u.RawQuery
56+
c.requestURI = u.RequestURI()
5757
c.client = &fasthttp.HostClient{
5858
Addr: u.Host,
5959
IsTLS: u.Scheme == "https",

0 commit comments

Comments
 (0)