Skip to content

Commit

Permalink
fix waiting coordinator nil
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Aug 29, 2023
1 parent f80ad60 commit 34c9a6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/feature/spqr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func (tctx *testContext) establishCoordinatorConnection() error {
return nil
}
}
delete(tctx.dbs, "coordinator")

if !ok || err != nil {
// check coordinator
Expand All @@ -270,12 +271,14 @@ func (tctx *testContext) establishCoordinatorConnection() error {
}

tctx.dbs["coordinator"] = db
return nil
}
}
}

return fmt.Errorf("failed to connect to coordinator")
if _, ok := tctx.dbs["coordinator"]; !ok {
return fmt.Errorf("failed to connect to coordinator")
}
return nil
}

func (tctx *testContext) getPostgresqlConnection(host string) (*sqlx.DB, error) {
Expand Down

0 comments on commit 34c9a6b

Please sign in to comment.