Browse Source

Conform to TMSP NewServer

pull/192/head
Jae Kwon 9 years ago
parent
commit
5266b56f43
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      proxy/remote_app_conn_test.go

+ 6
- 3
proxy/remote_app_conn_test.go View File

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


Loading…
Cancel
Save