diff --git a/testlib/infra.py b/testlib/infra.py index e131242..fe5d4bd 100644 --- a/testlib/infra.py +++ b/testlib/infra.py @@ -221,7 +221,6 @@ class PoolMetadataMonitor(unittest.TestCase): Manage verification of consistency of pool-level metadata. """ - def run_check(self): def _check_thin_meta_allocations(self, metadata): """ Check whether sizes of thin meta and thin meta spare match. @@ -241,10 +240,17 @@ def _check_thin_meta_allocations(self, metadata): "total size of thin meta spare device.", ) + def run_check(self, stop_time): """ Run the check. + + :param int stop_time: the time the test completed """ if PoolMetadataMonitor.verify: # pylint: disable=no-member + + # Wait for D-Bus to settle, so D-Bus and metadata can be compared + time.sleep(sleep_time(stop_time, 16)) + for object_path, _ in StratisDbus.pool_list(): (current, current_return_code, current_message) = ( StratisDbus.pool_get_metadata(object_path) @@ -589,7 +595,7 @@ def tearDown(self): FilesystemSymlinkMonitor.run_check(self, stop_time) - PoolMetadataMonitor.run_check(self) + PoolMetadataMonitor.run_check(self, stop_time) @staticmethod def set_from_post_test_check_option(post_test_check):