github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/common/signal/notifier_test.go (about) 1 package signal_test 2 3 import ( 4 "testing" 5 6 . "v2ray.com/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 }