Merge pull request #1605 from gravitational/rjones/extra-time

Increase time allowed for tests to run.
This commit is contained in:
Russell Jones 2018-01-16 18:16:08 -08:00 committed by GitHub
commit 79cf0af878
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -208,9 +208,10 @@ func (s *Suite) TestLocking(c *check.C) {
// release the lock, and the gorouting should unlock and advance i
s.bk.ReleaseLock(lock)
resumed := false
for attempt := 0; attempt < 50 && !resumed; attempt++ {
time.Sleep(time.Millisecond * 2)
for attempt := 0; attempt < 100 && !resumed; attempt++ {
time.Sleep(time.Millisecond * 10)
resumed = atomic.LoadInt32(&i) > 0
}
c.Assert(resumed, check.Equals, true)
}

View file

@ -69,7 +69,7 @@ func (s *TimeoutSuite) TestSlowOperation(c *check.C) {
}
func (s *TimeoutSuite) TestNormalOperation(c *check.C) {
client := newClient(time.Millisecond * 5)
client := newClient(time.Millisecond * 100)
resp, err := client.Get(s.server.URL + "/ping")
c.Assert(err, check.IsNil)
c.Assert(bodyText(resp), check.Equals, "pong")