MCPcopy Create free account
hub / github.com/screego/server / fakeInterrupt

Function fakeInterrupt

server/server_test.go:72–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func fakeInterrupt(t *testing.T) func() {
73 oldNotify := notifySignal
74 notifySignal = func(c chan<- os.Signal, sig ...os.Signal) {
75 assert.Contains(t, sig, os.Interrupt)
76 go func() {
77 time.Sleep(100 * time.Millisecond)
78 c <- os.Interrupt
79 }()
80 }
81 return func() {
82 notifySignal = oldNotify
83 }
84}
85
86func fakeShutdownError(err error) func() {
87 old := serverShutdown

Callers 2

TestShutdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected