mirror of
https://github.com/containers/podman.git
synced 2025-05-20 08:36:23 +08:00
Fix invalid wait condition on kill
When using the compatability tests on kill, the kill function goes into an infinite wait loop taking all of the CPU. This change will use the correct wait function and exit properly. Fixes: https://github.com/containers/podman/issues/9206 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -95,6 +95,15 @@ class TestContainers(unittest.TestCase):
|
||||
top.reload()
|
||||
self.assertIn(top.status, ("stopped", "exited"))
|
||||
|
||||
def test_kill_container(self):
|
||||
top = self.client.containers.get(TestContainers.topContainerId)
|
||||
self.assertEqual(top.status, "running")
|
||||
|
||||
# Kill a running container and validate the state
|
||||
top.kill()
|
||||
top.reload()
|
||||
self.assertIn(top.status, ("stopped", "exited"))
|
||||
|
||||
def test_restart_container(self):
|
||||
# Validate the container state
|
||||
top = self.client.containers.get(TestContainers.topContainerId)
|
||||
|
Reference in New Issue
Block a user