mirror of
https://github.com/fatedier/frp.git
synced 2025-07-24 14:51:39 +07:00
start refactoring
This commit is contained in:
21
utils/shutdown/shutdown_test.go
Normal file
21
utils/shutdown/shutdown_test.go
Normal file
@ -0,0 +1,21 @@
|
||||
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.WaitDown()
|
||||
}
|
Reference in New Issue
Block a user