summaryrefslogtreecommitdiff
path: root/test/e2e/system_service_test.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-12-10 14:57:01 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-12-10 15:01:44 +0100
commit99bc00421b825823281ac684e6601b2b23a3452d (patch)
treead38daa255f7b425a6a2dfe58c43ae34c66f869b /test/e2e/system_service_test.go
parentf80a7fda745a96a895184b92077a6356c305c2bb (diff)
downloadpodman-99bc00421b825823281ac684e6601b2b23a3452d.tar.gz
podman-99bc00421b825823281ac684e6601b2b23a3452d.tar.bz2
podman-99bc00421b825823281ac684e6601b2b23a3452d.zip
pprof CI flakes: enforce 5 seconds grace period
This gives the service 5 seconds to digest the signal and 5 more seconds to shutdown. Create a new variable to make bumping the timeout easier in case we see re-flake in the future. Fixes: #12167 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/e2e/system_service_test.go')
-rw-r--r--test/e2e/system_service_test.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/e2e/system_service_test.go b/test/e2e/system_service_test.go
index 922a8c423..4299146f5 100644
--- a/test/e2e/system_service_test.go
+++ b/test/e2e/system_service_test.go
@@ -18,6 +18,10 @@ import (
var _ = Describe("podman system service", func() {
var podmanTest *PodmanTestIntegration
+ // The timeout used to for the service to respond. As shown in #12167,
+ // this may take some time on machines under high load.
+ var timeout = 5
+
BeforeEach(func() {
tempdir, err := CreateTempDirInTempDir()
Expect(err).ShouldNot(HaveOccurred())
@@ -45,7 +49,7 @@ var _ = Describe("podman system service", func() {
defer session.Kill()
WaitForService(address)
- Eventually(session, 5).Should(Exit(0))
+ Eventually(session, timeout).Should(Exit(0))
})
})
@@ -88,8 +92,8 @@ var _ = Describe("podman system service", func() {
Expect(err).ShouldNot(HaveOccurred())
Expect(body).ShouldNot(BeEmpty())
- session.Interrupt().Wait(2 * time.Second)
- Eventually(session, 5).Should(Exit(1))
+ session.Interrupt().Wait(time.Duration(timeout) * time.Second)
+ Eventually(session, timeout).Should(Exit(1))
})
It("are not available", func() {
@@ -110,8 +114,8 @@ var _ = Describe("podman system service", func() {
// Combined with test above we have positive/negative test for pprof
Expect(session.Err.Contents()).ShouldNot(ContainSubstring(magicComment))
- session.Interrupt().Wait(2 * time.Second)
- Eventually(session, 5).Should(Exit(1))
+ session.Interrupt().Wait(time.Duration(timeout) * time.Second)
+ Eventually(session, timeout).Should(Exit(1))
})
})
})