Skip to content

Commit

Permalink
Assert that test timeout service is ready.
Browse files Browse the repository at this point in the history
  • Loading branch information
timoreimann authored and traefiker committed Jan 30, 2019
1 parent 49b89c3 commit 97bd92c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions integration/timeout_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package integration

import (
"fmt"
"net/http"
"os"
"time"
Expand Down Expand Up @@ -38,6 +39,10 @@ func (s *TimeoutSuite) TestForwardingTimeouts(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(response.StatusCode, checker.Equals, http.StatusGatewayTimeout)

// Check that timeout service is available
statusURL := fmt.Sprintf("http://%s:9000/statusTest?status=200", httpTimeoutEndpoint)
c.Assert(try.GetRequest(statusURL, 60*time.Second, try.StatusCodeIs(http.StatusOK)), checker.IsNil)

// This simulates a ResponseHeaderTimeout.
response, err = http.Get("http://127.0.0.1:8000/responseHeaderTimeout?sleep=1000")
c.Assert(err, checker.IsNil)
Expand Down

0 comments on commit 97bd92c

Please sign in to comment.