diff --git a/proxy/remote_app_conn_test.go b/proxy/remote_app_conn_test.go index a997cbfea..dcb4fdc16 100644 --- a/proxy/remote_app_conn_test.go +++ b/proxy/remote_app_conn_test.go @@ -13,10 +13,11 @@ func TestEcho(t *testing.T) { sockPath := Fmt("unix:///tmp/echo_%v.sock", RandStr(6)) // Start server - _, err := server.StartListener(sockPath, dummy.NewDummyApplication()) + s, err := server.NewServer(sockPath, dummy.NewDummyApplication()) if err != nil { Exit(err.Error()) } + defer s.Stop() // Start client proxy, err := NewRemoteAppConn(sockPath) if err != nil { @@ -35,10 +36,11 @@ func BenchmarkEcho(b *testing.B) { b.StopTimer() // Initialize sockPath := Fmt("unix:///tmp/echo_%v.sock", RandStr(6)) // Start server - _, err := server.StartListener(sockPath, dummy.NewDummyApplication()) + s, err := server.NewServer(sockPath, dummy.NewDummyApplication()) if err != nil { Exit(err.Error()) } + defer s.Stop() // Start client proxy, err := NewRemoteAppConn(sockPath) if err != nil { @@ -62,10 +64,11 @@ func BenchmarkEcho(b *testing.B) { func TestInfo(t *testing.T) { sockPath := Fmt("unix:///tmp/echo_%v.sock", RandStr(6)) // Start server - _, err := server.StartListener(sockPath, dummy.NewDummyApplication()) + s, err := server.NewServer(sockPath, dummy.NewDummyApplication()) if err != nil { Exit(err.Error()) } + defer s.Stop() // Start client proxy, err := NewRemoteAppConn(sockPath) if err != nil {