Skip to content

Commit

Permalink
Wait for D-Bus to settle in metadata tests
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Jul 15, 2024
1 parent 5a310f5 commit d8235c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions testlib/infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,17 @@ def _check_thin_meta_allocations(self, metadata):
"total size of thin meta spare device.",
)

def run_check(self):
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)
Expand Down Expand Up @@ -586,7 +592,7 @@ def tearDown(self):
SysfsMonitor().run_check()
SymlinkMonitor().run_check()
FilesystemSymlinkMonitor().run_check(stop_time)
PoolMetadataMonitor().run_check()
PoolMetadataMonitor().run_check(stop_time)

@staticmethod
def set_from_post_test_check_option(post_test_check):
Expand Down

0 comments on commit d8235c9

Please sign in to comment.