Skip to content

Commit

Permalink
fix(fvt): disable keepalive on toxiproxy client
Browse files Browse the repository at this point in the history
We don't want to keep the tcp conn alive as we only make very few
requests and it'll show up as a leaked goroutine in-between tests.

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
  • Loading branch information
dnwe committed Aug 11, 2023
1 parent 2facdec commit c797c9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/toxiproxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func NewClient(endpoint string) *Client {
KeepAlive: 30 * time.Second,
}).DialContext,
ForceAttemptHTTP2: true,
MaxIdleConns: 100,
MaxIdleConns: -1,
DisableKeepAlives: true,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
Expand Down

0 comments on commit c797c9d

Please sign in to comment.