mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-06 09:15:37 -05:00
dont start periodic task until necessary
This commit is contained in:
@@ -27,4 +27,10 @@ func TestPeriodicTaskStop(t *testing.T) {
|
||||
assert(value, Equals, 3)
|
||||
time.Sleep(time.Second * 4)
|
||||
assert(value, Equals, 3)
|
||||
common.Must(task.Start())
|
||||
time.Sleep(time.Second * 3)
|
||||
if value != 5 {
|
||||
t.Fatal("Expected 5, but ", value)
|
||||
}
|
||||
common.Must(task.Close())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user