Skip to content

Commit

Permalink
Add 1 more Ut on failure case
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Stroheker <[email protected]>
  • Loading branch information
julienstroheker committed Oct 16, 2024
1 parent 5f65a83 commit 07a9726
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions util/httpclient/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ func TestHTTPClientInitialization(t *testing.T) {
expectedReadIdleTimeout: 30 * time.Second,
expectedPingTimeout: 5 * time.Second,
},
{
name: "HTTP2 client ping enabled with defaults values when using invalid timeouts",
envVars: map[string]string{
"HTTP2_TRANSPORT_PING_ENABLED": "true",
"HTTP2_TRANSPORT_READ_IDLE_TIMEOUT": "whatever",
"HTTP2_TRANSPORT_PING_TIMEOUT": "whatever",
},
expectedHTTP2ClientPingEnabled: true,
expectedReadIdleTimeout: 30 * time.Second,
expectedPingTimeout: 5 * time.Second,
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 07a9726

Please sign in to comment.