Skip to content

Commit

Permalink
Merge e6638f7 into 88fd0ce
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovic committed Dec 7, 2017
2 parents 88fd0ce + e6638f7 commit 6dcb5a4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions stan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ import (
"github.com/nats-io/go-nats"
"github.com/nats-io/go-nats-streaming/pb"
"github.com/nats-io/nats-streaming-server/server"
"github.com/nats-io/nats-streaming-server/test"
)

func RunServer(ID string) *server.StanServer {
return test.RunServer(ID)
s, err := server.RunServer(ID)
if err != nil {
panic(err)
}
return s
}

func runServerWithOpts(sOpts *server.Options) *server.StanServer {
s, err := server.RunServerWithOpts(sOpts, nil)
if err != nil {
panic(err)
}
return s
}

// Dumb wait program to sync on callbacks, etc... Will timeout
Expand Down Expand Up @@ -1354,7 +1365,7 @@ func TestMaxChannels(t *testing.T) {
opts.MaxChannels = 10

// Run a NATS Streaming server
s := test.RunServerWithOpts(opts, nil)
s := runServerWithOpts(opts)
defer s.Shutdown()

sc := NewDefaultConnection(t)
Expand Down Expand Up @@ -1615,7 +1626,7 @@ func TestTimeoutOnRequests(t *testing.T) {
opts := server.GetDefaultOptions()
opts.ID = clusterName
opts.NATSServerURL = nats.DefaultURL
s := test.RunServerWithOpts(opts, nil)
s := runServerWithOpts(opts)
defer s.Shutdown()

sc := NewDefaultConnection(t)
Expand Down

0 comments on commit 6dcb5a4

Please sign in to comment.