From 5fed6f5681a34ed82d0a2d444cbfd93f27f1df37 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 18 Jan 2019 15:14:05 +0800 Subject: [PATCH] update unit test case of gmlock --- g/os/gmlock/gmlock_unit_lock_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/g/os/gmlock/gmlock_unit_lock_test.go b/g/os/gmlock/gmlock_unit_lock_test.go index 3e022b21c..b190ed7a6 100644 --- a/g/os/gmlock/gmlock_unit_lock_test.go +++ b/g/os/gmlock/gmlock_unit_lock_test.go @@ -50,8 +50,9 @@ func TestLocker_Lock_Expire(t *testing.T) { array.Append(1) }() go func() { + time.Sleep(10*time.Millisecond) gmlock.Lock("test") - time.Sleep(50*time.Millisecond) + time.Sleep(100*time.Millisecond) array.Append(1) gmlock.Unlock("test") }()