Skip to content

Commit

Permalink
Merge pull request #20735 from arixmkii/timeout_list_test_go
Browse files Browse the repository at this point in the history
Use configured timeout in list_test.go
  • Loading branch information
openshift-merge-bot[bot] authored Nov 22, 2023
2 parents 87d4411 + e85cedf commit 155622b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/machine/e2e/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ var _ = Describe("podman machine list", func() {
s := new(startMachine)
startSession, err := mb.setCmd(s).runWithoutWait()
Expect(err).ToNot(HaveOccurred())
for i := 0; i < 30; i++ {
wait := 3
retries := (int)(mb.timeout/time.Second) / wait
for i := 0; i < retries; i++ {
listSession, err := mb.setCmd(l).run()
Expect(listSession).To(Exit(0))
Expect(err).ToNot(HaveOccurred())
Expand All @@ -103,7 +105,7 @@ var _ = Describe("podman machine list", func() {
} else {
break
}
time.Sleep(3 * time.Second)
time.Sleep(time.Duration(wait) * time.Second)
}
Expect(startSession).To(Exit(0))
listSession, err = mb.setCmd(l).run()
Expand Down

0 comments on commit 155622b

Please sign in to comment.