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") }()