Skip to content

Commit 0e54111

Browse files
Upgrade client creation (linter blocking)
1 parent af85cb5 commit 0e54111

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

systest/backup/nfs-backup/backup_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ func backupRestoreTest(t *testing.T, backupAlphaName string, backupZeroName stri
7676
// Wait for gRPC connection to be ready with retries
7777
t.Log("Waiting for gRPC connection to be ready...")
7878
for i := 0; i < 30; i++ {
79-
conn, connErr := grpc.NewClient(backupAlphaSocketAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
79+
var connErr error
80+
dg, connErr = dgo.Open(fmt.Sprintf("dgraph://%s?sslmode=disable", backupAlphaSocketAddr))
8081
if connErr != nil {
81-
t.Logf("Failed to create gRPC client (attempt %d/30): %v", i+1, connErr)
82+
err = connErr
83+
t.Logf("Failed to create Dgraph client (attempt %d/30): %v", i+1, connErr)
8284
time.Sleep(time.Second)
8385
continue
8486
}
85-
dg = dgo.NewDgraphClient(api.NewDgraphClient(conn))
8687
_, err = testutil.RetryQuery(dg, `schema {}`)
8788
if err == nil {
8889
break

0 commit comments

Comments
 (0)