mirror of https://github.com/fatedier/frp.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
248 B
Go
22 lines
248 B
Go
8 years ago
|
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()
|
||
|
}
|