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