mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
Use configured timeout in list_test.go
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
This commit is contained in:
@ -94,7 +94,9 @@ var _ = Describe("podman machine list", func() {
|
|||||||
s := new(startMachine)
|
s := new(startMachine)
|
||||||
startSession, err := mb.setCmd(s).runWithoutWait()
|
startSession, err := mb.setCmd(s).runWithoutWait()
|
||||||
Expect(err).ToNot(HaveOccurred())
|
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()
|
listSession, err := mb.setCmd(l).run()
|
||||||
Expect(listSession).To(Exit(0))
|
Expect(listSession).To(Exit(0))
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
@ -103,7 +105,7 @@ var _ = Describe("podman machine list", func() {
|
|||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
time.Sleep(3 * time.Second)
|
time.Sleep(time.Duration(wait) * time.Second)
|
||||||
}
|
}
|
||||||
Expect(startSession).To(Exit(0))
|
Expect(startSession).To(Exit(0))
|
||||||
listSession, err = mb.setCmd(l).run()
|
listSession, err = mb.setCmd(l).run()
|
||||||
|
Reference in New Issue
Block a user