From fbe896a4ed934c9e5af1fd355c92b684cdd18ae8 Mon Sep 17 00:00:00 2001 From: jolestar Date: Mon, 11 Nov 2019 19:54:23 +0800 Subject: [PATCH] Set unit test timeout. --- concurrent/cond_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/concurrent/cond_test.go b/concurrent/cond_test.go index 49de4b4..d917fa1 100644 --- a/concurrent/cond_test.go +++ b/concurrent/cond_test.go @@ -90,10 +90,10 @@ func TestTimeoutCondWaitTimeoutNotify(t *testing.T) { wait := sync.WaitGroup{} wait.Add(2) ch := make(chan time.Duration, 1) - timeout := 2 * time.Second + timeout := 5 * time.Second go func() { begin := time.Now() - obj.lockAndWaitWithTimeout(time.Duration(timeout) * time.Millisecond) + obj.lockAndWaitWithTimeout(timeout * time.Millisecond) elapsed := time.Since(begin) ch <- elapsed wait.Done()