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 21, 2023
1 parent 6c54acf commit 2d3bad7
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,6 +322,10 @@ 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. The provided context
// should have a timeout to ensure an error is eventually returned if
// the node never becomes healthy.
func (n *LocalNode) WaitForHealthy(ctx context.Context) error {
ticker := time.NewTicker(DefaultNodeTickerInterval)
defer ticker.Stop()
Expand Down

0 comments on commit 2d3bad7

Please sign in to comment.