Revert "testsuite: fix race with SMART data"
authorDavid Zeuthen <davidz@redhat.com>
Fri, 26 Aug 2011 17:09:41 +0000 (13:09 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 26 Aug 2011 17:09:41 +0000 (13:09 -0400)
This reverts commit f1c8f3cadc3441189e00427abed1a2190214d38e.

tests/run

index 06936b5..57121b0 100755 (executable)
--- a/tests/run
+++ b/tests/run
@@ -1088,20 +1088,15 @@ class Smart(UDisksTestCase):
                 self.manager_iface.FindDeviceByDeviceFile(hd))
         iface = dbus.Interface(obj, I_D)
         props = dbus.Interface(obj, dbus.PROPERTIES_IFACE)
+        info = self.get_info(devname=hd)
 
         self.assertEqual(props.Get(I_D, 'DriveAtaSmartIsAvailable'),
                 has_smart)
 
         if has_smart:
             print >> sys.stderr, '[avail] ',
-
-            # wait for SMART data to be read
-            while props.Get(I_D, 'DriveAtaSmartTimeCollected') == 0:
-                print >> sys.stderr, '[wait for data] ',
-                time.sleep(0.5)
-
-            info = self.get_info(devname=hd)
             self.assert_(info['ATA SMART'].startswith('Updated at '))
+            self.assertNotEqual(props.Get(I_D, 'DriveAtaSmartTimeCollected'), 0)
             global hd_smart_blob
             hd_smart_blob = ''.join(map(chr, props.Get(I_D, 'DriveAtaSmartBlob')))
             # this is of course not truly correct for a test suite, but let's