[rhel6-branch 29/30] Delay until non-empty subvolume list is returned.
mulkieran
installerbot-noreply at redhat.com
Thu May 28 21:04:34 UTC 2015
From: mulhern <amulhern at redhat.com>
Then we can check if it is the correct one.
Signed-off-by: mulhern <amulhern at redhat.com>
---
tests/devicelibs_test/btrfs_test.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/devicelibs_test/btrfs_test.py b/tests/devicelibs_test/btrfs_test.py
index 3f6c867..10842d4 100755
--- a/tests/devicelibs_test/btrfs_test.py
+++ b/tests/devicelibs_test/btrfs_test.py
@@ -135,12 +135,16 @@ def testSubvolume(self):
self.assertEqual(btrfs.create_subvolume(self.mountpoint, "SV1"), 0)
self.assertEqual(btrfs.create_subvolume(self.mountpoint, "SV2"), 0)
subvolumes = btrfs.list_subvolumes(self.mountpoint)
+ while not subvolumes:
+ subvolumes = btrfs.list_subvolumes(self.mountpoint)
self.assertIn("SV1", [v['path'] for v in subvolumes])
self.assertIn("SV2", [v['path'] for v in subvolumes])
# we can remove one subvolume
self.assertEqual(btrfs.delete_subvolume(self.mountpoint, "SV1"), 0)
subvolumes = btrfs.list_subvolumes(self.mountpoint)
+ while not subvolumes:
+ subvolumes = btrfs.list_subvolumes(self.mountpoint)
self.assertNotIn("SV1", [v['path'] for v in subvolumes])
# if the subvolume is already gone, an error is raised by btrfs
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/834686b40f939033813c0621a4a6a85ed228a9aa
More information about the anaconda-patches
mailing list