MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / TestServer_Close

Function TestServer_Close

rpc/mux/server_test.go:354–372  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

352}
353
354func TestServer_Close(t *testing.T) {
355 log.SetLevel(log.FatalLevel)
356 addr := "127.0.0.1:0"
357 l, err := net.Listen("tcp", addr)
358 if err != nil {
359 log.Fatal(err)
360 }
361
362 server := NewServer()
363 testService := NewTestService()
364 err = server.RegisterService("Test", testService)
365 if err != nil {
366 log.Fatal(err)
367 }
368 server.SetListener(l)
369 go server.Serve()
370
371 server.Stop()
372}

Callers

nothing calls this directly

Calls 8

RegisterServiceMethod · 0.95
SetListenerMethod · 0.95
ServeMethod · 0.95
StopMethod · 0.95
SetLevelFunction · 0.92
FatalFunction · 0.92
NewServerFunction · 0.70
NewTestServiceFunction · 0.70

Tested by

no test coverage detected