Skip to content

Commit

Permalink
clients: fix bug in client setup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
codesenberg committed Dec 28, 2018
1 parent 6491a5d commit de4602d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bombardier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestBombardierHTTPCodeRecording(t *testing.T) {
}

func testBombardierHTTPCodeRecording(clientType clientTyp, t *testing.T) {
cs := []int{102, 200, 302, 404, 505, 606, 707}
cs := []int{200, 302, 404, 505, 606, 707}
codes := ring.New(len(cs))
for _, v := range cs {
codes.Value = v
Expand Down Expand Up @@ -202,7 +202,6 @@ func testBombardierHTTPCodeRecording(clientType clientTyp, t *testing.T) {
expected uint64
}{
{"errored", b.others, eachCodeCount * 2},
{"1xx", b.req1xx, eachCodeCount},
{"2xx", b.req2xx, eachCodeCount},
{"3xx", b.req3xx, eachCodeCount},
{"4xx", b.req4xx, eachCodeCount},
Expand Down
2 changes: 1 addition & 1 deletion clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func newFastHTTPClient(opts *clientOpts) client {
panic(err)
}
c.host = u.Host
c.requestURI = "/" + u.Path + "?" + u.RawQuery
c.requestURI = u.RequestURI()
c.client = &fasthttp.HostClient{
Addr: u.Host,
IsTLS: u.Scheme == "https",
Expand Down

0 comments on commit de4602d

Please sign in to comment.