From dd94cf7ed9303a4a23e50375dee1179524636a6a Mon Sep 17 00:00:00 2001 From: Russell Jones Date: Tue, 16 Jan 2018 17:14:56 -0800 Subject: [PATCH] Increase time allowed for tests to run. --- lib/backend/dir/impl_test.go | 5 +++-- lib/utils/timeout_test.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/backend/dir/impl_test.go b/lib/backend/dir/impl_test.go index 1ac40cf2987..a3e991e4ba9 100644 --- a/lib/backend/dir/impl_test.go +++ b/lib/backend/dir/impl_test.go @@ -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) + } diff --git a/lib/utils/timeout_test.go b/lib/utils/timeout_test.go index a30b141505d..25091072a7e 100644 --- a/lib/utils/timeout_test.go +++ b/lib/utils/timeout_test.go @@ -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")