diff --git a/os/gtimer/gtimer_z_unit_test.go b/os/gtimer/gtimer_z_unit_test.go index 61035c487..68ad0639a 100644 --- a/os/gtimer/gtimer_z_unit_test.go +++ b/os/gtimer/gtimer_z_unit_test.go @@ -121,12 +121,12 @@ func TestDelayAddSingleton(t *testing.T) { func TestDelayAddOnce(t *testing.T) { gtest.C(t, func(t *gtest.T) { array := garray.New(true) - gtimer.DelayAddOnce(ctx, 200*time.Millisecond, 200*time.Millisecond, func(ctx context.Context) { + gtimer.DelayAddOnce(ctx, 1000*time.Millisecond, 2000*time.Millisecond, func(ctx context.Context) { array.Append(1) }) - time.Sleep(300 * time.Millisecond) + time.Sleep(2000 * time.Millisecond) t.Assert(array.Len(), 0) - time.Sleep(1000 * time.Millisecond) + time.Sleep(2000 * time.Millisecond) t.Assert(array.Len(), 1) }) }