Xray-core/common/signal/notifier_test.go

21 lines
226 B
Go
Raw Permalink Normal View History

2020-11-25 11:01:53 +00:00
package signal_test
import (
"testing"
2020-12-04 01:36:16 +00:00
. "github.com/xtls/xray-core/common/signal"
2020-11-25 11:01:53 +00:00
)
func TestNotifierSignal(t *testing.T) {
n := NewNotifier()
w := n.Wait()
n.Signal()
select {
case <-w:
default:
t.Fail()
}
}