Skip to content

Commit

Permalink
client: fix client_test
Browse files Browse the repository at this point in the history
before creating new client, we need to ensure GrpcServer is up.

Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
  • Loading branch information
ISHIDA Wataru committed Jan 13, 2017
1 parent 9079b26 commit f591da3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package client

import (
"testing"
"time"

api "github.com/osrg/gobgp/api"
"github.com/osrg/gobgp/config"
Expand All @@ -30,7 +31,9 @@ func TestGetNeighbor(test *testing.T) {
go s.Serve()
g := api.NewGrpcServer(s, ":50051")
go g.Serve()
time.Sleep(time.Second)
cli, err := New("")
assert.Nil(err)
err = cli.StartServer(&config.Global{
Config: config.GlobalConfig{
As: 1,
Expand Down

0 comments on commit f591da3

Please sign in to comment.