Skip to content

Commit

Permalink
fixup: respond to review feedback #3
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Aug 26, 2023
1 parent 205e16c commit dce58f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/fixture/testnet/local/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ func (n *LocalNode) IsHealthy(ctx context.Context) (bool, error) {
return false, fmt.Errorf("failed to query node health: %w", err)
}

// WaitForHealthy blocks until IsHealthy returns true or an error (including context timeout) is observed.
func (n *LocalNode) WaitForHealthy(ctx context.Context) error {
if _, ok := ctx.Deadline(); !ok {
return fmt.Errorf("unable to wait for health for node %q with a context without a deadline", n.NodeID)
}
ticker := time.NewTicker(DefaultNodeTickerInterval)
defer ticker.Stop()

Expand Down

0 comments on commit dce58f6

Please sign in to comment.