Skip to content

Commit

Permalink
Refactor health check function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennievon committed Dec 29, 2023
1 parent 6386d90 commit d87f71a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration/networktest/env/dev_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func awaitHealthStatus(rpcAddress string, timeout time.Duration) error {
return fmt.Errorf("failed dial host (%s): %w", rpcAddress, err)
}
defer c.Close()
healthy, err := c.HealthStatusOfNode()
healthy, err := c.Health()
if err != nil {
return fmt.Errorf("failed to get host health (%s): %w", rpcAddress, err)
}
Expand Down
2 changes: 1 addition & 1 deletion integration/networktest/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NodeHealthCheck(rpcAddress string) error {
if err != nil {
return err
}
health, err := client.HealthStatusOfNode()
health, err := client.Health()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion integration/simulation/network/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (n *networkOfSocketNodes) createConnections(simParams *params.SimParams) er
startTime := time.Now()
healthy := false
for ; !healthy; time.Sleep(500 * time.Millisecond) {
healthy, _ = client.HealthStatusOfNode()
healthy, _ = client.Health()
if time.Now().After(startTime.Add(3 * time.Minute)) {
return fmt.Errorf("nodes not healthy after 3 minutes")
}
Expand Down
2 changes: 1 addition & 1 deletion testnet/launcher/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func waitForHealthyNode(port int) error { // todo: hook the cfg
defer client.Stop()

obsClient := obsclient.NewObsClient(client)
health, err := obsClient.HealthStatusOfNode()
health, err := obsClient.Health()
if err != nil {
return err
}
Expand Down

0 comments on commit d87f71a

Please sign in to comment.