mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
22 lines
248 B
Go
22 lines
248 B
Go
package shutdown
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestShutdown(t *testing.T) {
|
|
s := New()
|
|
go func() {
|
|
time.Sleep(time.Millisecond)
|
|
s.Start()
|
|
}()
|
|
s.WaitStart()
|
|
|
|
go func() {
|
|
time.Sleep(time.Millisecond)
|
|
s.Done()
|
|
}()
|
|
s.WaitDone()
|
|
}
|