Skip to content

Fixes for install/upgrade tests - #682

Draft
glehmann wants to merge 3 commits into
masterfrom
gln/install
Draft

Fixes for install/upgrade tests#682
glehmann wants to merge 3 commits into
masterfrom
gln/install

Conversation

@glehmann

Copy link
Copy Markdown
Member

No description provided.

Include the msg parameter in the TimeoutError raised by wait_for
so that timeout failures include the human-readable description
of what was being waited for.

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
The default target verification can fail transiently early after boot
while units are still being loaded. Retry the analysis with wait_for so
only persistent issues fail the test.

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>

@ydirson ydirson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it make sense to wait for default target to be reached before verification, instead of looping till it passes?

Comment thread lib/common.py
Comment on lines -209 to +210
"Timeout reached while waiting for fn call to yield %s (%s)." % (expected, timeout_secs)
"Timed out after %ss waiting for condition to be %s%s" % (timeout_secs, expected, suffix)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example output would help

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously, it looked like:

FAILED tests/unit/test_rescan_block_devices_info.py::test_timeout - TimeoutError: Timeout reached while waiting for fn call to yield True (10).

with this change:

FAILED tests/unit/test_rescan_block_devices_info.py::test_timeout - TimeoutError: Timed out after 10s waiting for condition to be True: Wait for coalesce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants