Skip to content

Commit

Permalink
add test for flush interval vs timeout logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jusshersmith committed May 23, 2019
1 parent 4447912 commit b3e2450
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/proxy/reverse_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,16 @@ func TestTimeoutHandler(t *testing.T) {
ExpectedStatusCode: 200,
ExpectedBody: "OK",
},
{
name: "does not time out because flush interval is set",
config: &UpstreamConfig{
Timeout: time.Duration(100) * time.Millisecond,
FlushInterval: time.Duration(10) * time.Millisecond,
},
globalTimeout: time.Duration(100) * time.Millisecond,
ExpectedStatusCode: 200,
ExpectedBody: "OK",
},
{
name: "times out using upstream config timeout",
config: &UpstreamConfig{
Expand Down

0 comments on commit b3e2450

Please sign in to comment.