Skip to content

Commit

Permalink
removed dependency on go-nats/test (#151)
Browse files Browse the repository at this point in the history
* removed dependency on natstest

* switched to `defer nc.Close()`
  • Loading branch information
Peter Miron committed Aug 18, 2017
1 parent d99acc1 commit 1b74f22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
natsd "github.com/nats-io/gnatsd/test"
"github.com/nats-io/go-nats"
"github.com/nats-io/go-nats-streaming/pb"
natstest "github.com/nats-io/go-nats/test"
"github.com/nats-io/nats-streaming-server/server"
"github.com/nats-io/nats-streaming-server/test"
)
Expand Down Expand Up @@ -1459,7 +1458,12 @@ func TestNatsConn(t *testing.T) {
sc.Close()

// Make sure we can get the Conn we provide.
nc = natstest.NewDefaultConnection(t)
opts = nats.GetDefaultOptions()
nc, err = opts.Connect()
if err != nil {
t.Fatalf("Expected to connect correctly, got err %v", err)
}
defer nc.Close()
sc, err = Connect(clusterName, clientName, NatsConn(nc))
if err != nil {
t.Fatalf("Expected to connect correctly, got err %v", err)
Expand Down

0 comments on commit 1b74f22

Please sign in to comment.