From e85cedf43f70c7add9a86825ff579a470b7b7def Mon Sep 17 00:00:00 2001 From: Arthur Sengileyev Date: Tue, 21 Nov 2023 16:36:46 +0200 Subject: [PATCH] Use configured timeout in list_test.go Signed-off-by: Arthur Sengileyev --- pkg/machine/e2e/list_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/machine/e2e/list_test.go b/pkg/machine/e2e/list_test.go index 2c94a8582c..22592578f3 100644 --- a/pkg/machine/e2e/list_test.go +++ b/pkg/machine/e2e/list_test.go @@ -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()) @@ -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()