mirror of https://github.com/containers/podman.git
e2e: fix potential race in file-locks test
Two test flakes in the past week. Looks like the usual race between "run -d" and "assume the container is ready". I don't know if this will resolve them, but it's still a good idea. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
parent
722807a44c
commit
945995be10
|
@ -1449,10 +1449,11 @@ var _ = Describe("Podman checkpoint", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman checkpoint and restore container with --file-locks", func() {
|
It("podman checkpoint and restore container with --file-locks", func() {
|
||||||
localRunString := getRunString([]string{"--name", "test_name", ALPINE, "flock", "test.lock", "sleep", "100"})
|
localRunString := getRunString([]string{"--name", "test_name", ALPINE, "flock", "test.lock", "sh", "-c", "echo READY;sleep 100"})
|
||||||
session := podmanTest.Podman(localRunString)
|
session := podmanTest.Podman(localRunString)
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(ExitCleanly())
|
Expect(session).Should(ExitCleanly())
|
||||||
|
Expect(WaitContainerReady(podmanTest, "test_name", "READY", 5, 1)).To(BeTrue(), "Timed out waiting for READY")
|
||||||
|
|
||||||
// Checkpoint is expected to fail without --file-locks
|
// Checkpoint is expected to fail without --file-locks
|
||||||
result := podmanTest.Podman([]string{"container", "checkpoint", "test_name"})
|
result := podmanTest.Podman([]string{"container", "checkpoint", "test_name"})
|
||||||
|
|
Loading…
Reference in New Issue