github.com/xmplusdev/xray-core@v1.8.10/common/signal/notifier_test.go (about) 1 package signal_test 2 3 import ( 4 "testing" 5 6 . "github.com/xmplusdev/xray-core/common/signal" 7 ) 8 9 func TestNotifierSignal(t *testing.T) { 10 n := NewNotifier() 11 12 w := n.Wait() 13 n.Signal() 14 15 select { 16 case <-w: 17 default: 18 t.Fail() 19 } 20 }