Skip to content

Commit

Permalink
test: retry getting client in TestNodes. (#6468)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Sep 17, 2020
1 parent ed63786 commit 512c69b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion systest/group-delete/group_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,15 @@ func getError(rc io.ReadCloser) error {
}

func TestNodes(t *testing.T) {
dg, err := testutil.GetClientToGroup("1")
var dg *dgo.Dgraph
var err error
for i := 0; i < 3; i++ {
dg, err = testutil.GetClientToGroup("1")
if err == nil {
break
}
time.Sleep(5*time.Second)
}
require.NoError(t, err, "error while getting connection to group 1")

NodesSetup(t, dg)
Expand Down

0 comments on commit 512c69b

Please sign in to comment.