Browse Source

Fix tests to clean up after themselves

pull/1780/head
Jae Kwon 9 years ago
parent
commit
72540f9cac
2 changed files with 6 additions and 4 deletions
  1. +3
    -2
      example/dummy/dummy_test.go
  2. +3
    -2
      example/nil/nil_test.go

+ 3
- 2
example/dummy/dummy_test.go View File

@ -14,13 +14,14 @@ func TestStream(t *testing.T) {
numAppendTxs := 200000 numAppendTxs := 200000
// Start the listener // Start the listener
_, err := server.NewServer("tcp://127.0.0.1:46658", NewDummyApplication())
server, err := server.NewServer("unix://test.sock", NewDummyApplication())
if err != nil { if err != nil {
Exit(err.Error()) Exit(err.Error())
} }
defer server.Stop()
// Connect to the socket // Connect to the socket
conn, err := Connect("tcp://127.0.0.1:46658")
conn, err := Connect("unix://test.sock")
if err != nil { if err != nil {
Exit(err.Error()) Exit(err.Error())
} }


+ 3
- 2
example/nil/nil_test.go View File

@ -14,13 +14,14 @@ func TestStream(t *testing.T) {
numAppendTxs := 200000 numAppendTxs := 200000
// Start the listener // Start the listener
_, err := server.NewServer("tcp://127.0.0.1:46658", NewNilApplication())
server, err := server.NewServer("unix://test.sock", NewNilApplication())
if err != nil { if err != nil {
Exit(err.Error()) Exit(err.Error())
} }
defer server.Stop()
// Connect to the socket // Connect to the socket
conn, err := Connect("tcp://127.0.0.1:46658")
conn, err := Connect("unix://test.sock")
if err != nil { if err != nil {
Exit(err.Error()) Exit(err.Error())
} }


Loading…
Cancel
Save