Skip to content

Commit

Permalink
tests: Settle down before checking the LVM RAID MissingPhysicalVolume…
Browse files Browse the repository at this point in the history
…s property
  • Loading branch information
tbzatek committed Aug 9, 2023
1 parent ed691d5 commit a2f6661
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tests/dbus-tests/test_20_LVM.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,14 @@ def waitRaid1Structure(pv1, pv2, pv3):
# Yank out the first vdev and repair the LV with the fourth
_ret, _output = self.run_command('echo yes >/sys/block/%s/device/delete' % os.path.basename(self.vdevs[0]))
self.addCleanup(self._rescan_lio_devices)
self.get_property(vg, '.VolumeGroup', 'MissingPhysicalVolumes').assertEqual([first_vdev_uuid])
# give udisks some time to register the change
self.run_command('udevadm trigger %s' % self.vdevs[0])
self.udev_settle()
_ret, sys_health = self.run_command('lvs -o health_status --noheadings --nosuffix %s/%s' % (vgname, lvname))
self.assertEqual(sys_health, "partial")

waitRaid1Structure(None, devs[1], devs[2])
self.get_property(vg, '.VolumeGroup', 'MissingPhysicalVolumes').assertEqual([first_vdev_uuid])

lv.Repair(devs[3:4], self.no_options,
dbus_interface=self.iface_prefix + '.LogicalVolume')
Expand Down

0 comments on commit a2f6661

Please sign in to comment.