Skip to content

Commit

Permalink
Fix waitOnOdysseyAlive() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey M. Borodin committed Sep 1, 2023
1 parent bb0a819 commit d5f29cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/ody-integration-test/pkg/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ func OdysseyIsAlive(ctx context.Context) error {
}

func waitOnOdysseyAlive(ctx context.Context, timeout time.Duration) error {
for ok := false; !ok && timeout > 0; ok = OdysseyIsAlive(ctx) == nil {
for OdysseyIsAlive(ctx) != nil {
timeout -= time.Second
if timeout < 0 {
return fmt.Errorf("timeout expired")
}
time.Sleep(time.Second)
fmt.Printf("waiting for od up: remamining time %d\n", timeout/time.Second)
}

if timeout < 0 {
return fmt.Errorf("timeout expired")
}
return nil
}

0 comments on commit d5f29cc

Please sign in to comment.