Skip to content

Commit

Permalink
(release/v20.07) test: retry getting client in TestNodes. (#6482)
Browse files Browse the repository at this point in the history
(cherry picked from commit 512c69b)
  • Loading branch information
martinmr authored Sep 18, 2020
1 parent fcbecc1 commit 618ae3d
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 618ae3d

Please sign in to comment.