|
@ -4,6 +4,7 @@ import ( |
|
|
"context" |
|
|
"context" |
|
|
"testing" |
|
|
"testing" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/fortytw2/leaktest" |
|
|
"github.com/stretchr/testify/assert" |
|
|
"github.com/stretchr/testify/assert" |
|
|
|
|
|
|
|
|
abciclientent "github.com/tendermint/tendermint/abci/client" |
|
|
abciclientent "github.com/tendermint/tendermint/abci/client" |
|
@ -13,6 +14,8 @@ import ( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func TestClientServerNoAddrPrefix(t *testing.T) { |
|
|
func TestClientServerNoAddrPrefix(t *testing.T) { |
|
|
|
|
|
t.Cleanup(leaktest.Check(t)) |
|
|
|
|
|
|
|
|
ctx, cancel := context.WithCancel(context.Background()) |
|
|
ctx, cancel := context.WithCancel(context.Background()) |
|
|
defer cancel() |
|
|
defer cancel() |
|
|
|
|
|
|
|
@ -27,9 +30,11 @@ func TestClientServerNoAddrPrefix(t *testing.T) { |
|
|
assert.NoError(t, err, "expected no error on NewServer") |
|
|
assert.NoError(t, err, "expected no error on NewServer") |
|
|
err = server.Start(ctx) |
|
|
err = server.Start(ctx) |
|
|
assert.NoError(t, err, "expected no error on server.Start") |
|
|
assert.NoError(t, err, "expected no error on server.Start") |
|
|
|
|
|
t.Cleanup(server.Wait) |
|
|
|
|
|
|
|
|
client, err := abciclientent.NewClient(logger, addr, transport, true) |
|
|
client, err := abciclientent.NewClient(logger, addr, transport, true) |
|
|
assert.NoError(t, err, "expected no error on NewClient") |
|
|
assert.NoError(t, err, "expected no error on NewClient") |
|
|
err = client.Start(ctx) |
|
|
err = client.Start(ctx) |
|
|
assert.NoError(t, err, "expected no error on client.Start") |
|
|
assert.NoError(t, err, "expected no error on client.Start") |
|
|
|
|
|
t.Cleanup(client.Wait) |
|
|
} |
|
|
} |