From be3e87b2383c1fee8db12f34f69bae9ca7eb809a Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 14 Dec 2015 11:38:07 -0800 Subject: [PATCH] pkg/fileutil: make TestLockAndUnlock less flaky on CI CI is slow sometime. To make the test less flaky, we increases the timeout. This does not affect the correctness, but the test might take longer to finish or to fail. --- pkg/fileutil/lock_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/fileutil/lock_test.go b/pkg/fileutil/lock_test.go index cda47deea..29205e090 100644 --- a/pkg/fileutil/lock_test.go +++ b/pkg/fileutil/lock_test.go @@ -78,7 +78,7 @@ func TestLockAndUnlock(t *testing.T) { select { case <-locked: t.Error("unexpected unblocking") - case <-time.After(10 * time.Millisecond): + case <-time.After(100 * time.Millisecond): } // unlock @@ -90,7 +90,7 @@ func TestLockAndUnlock(t *testing.T) { // the previously blocked routine should be unblocked select { case <-locked: - case <-time.After(20 * time.Millisecond): + case <-time.After(1 * time.Second): t.Error("unexpected blocking") } }