Skip to content

Commit

Permalink
Drop testutil wait to 2 seconds.
Browse files Browse the repository at this point in the history
There's likely a race (related to #2644) where the catalog update might be in but the leader tracking doesn't report a leader, so this blocks forever and then times out. As a workaround we can lower the query wait time to always allow for a few retries.
  • Loading branch information
slackpad authored Feb 6, 2017
1 parent 97dbfb8 commit 14c6d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testutil/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (s *TestServer) waitForLeader() {
var index int64
WaitForResult(func() (bool, error) {
// Query the API and check the status code.
url := s.url(fmt.Sprintf("/v1/catalog/nodes?index=%d&wait=10s", index))
url := s.url(fmt.Sprintf("/v1/catalog/nodes?index=%d&wait=2s", index))
resp, err := s.HttpClient.Get(url)
if err != nil {
return false, err
Expand Down

0 comments on commit 14c6d00

Please sign in to comment.