diff --git a/example/dummy/dummy_test.go b/example/dummy/dummy_test.go index 073815bef..22338b00c 100644 --- a/example/dummy/dummy_test.go +++ b/example/dummy/dummy_test.go @@ -14,13 +14,14 @@ func TestStream(t *testing.T) { numAppendTxs := 200000 // Start the listener - _, err := server.NewServer("tcp://127.0.0.1:46658", NewDummyApplication()) + server, err := server.NewServer("unix://test.sock", NewDummyApplication()) if err != nil { Exit(err.Error()) } + defer server.Stop() // Connect to the socket - conn, err := Connect("tcp://127.0.0.1:46658") + conn, err := Connect("unix://test.sock") if err != nil { Exit(err.Error()) } diff --git a/example/nil/nil_test.go b/example/nil/nil_test.go index 8ffa388e6..0f3f6adb4 100644 --- a/example/nil/nil_test.go +++ b/example/nil/nil_test.go @@ -14,13 +14,14 @@ func TestStream(t *testing.T) { numAppendTxs := 200000 // Start the listener - _, err := server.NewServer("tcp://127.0.0.1:46658", NewNilApplication()) + server, err := server.NewServer("unix://test.sock", NewNilApplication()) if err != nil { Exit(err.Error()) } + defer server.Stop() // Connect to the socket - conn, err := Connect("tcp://127.0.0.1:46658") + conn, err := Connect("unix://test.sock") if err != nil { Exit(err.Error()) }