Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Speedup indefinite freeze tests #1194

Merged

Conversation

jku
Copy link
Member

@jku jku commented Oct 30, 2020

Remove sleep() calls worth ~15 seconds from indefinite freeze tests. Instead mock time.time() so Updater thinks it's running in the future.

Also add mentions of ExpiredMetadataError in Updater docs

Jussi Kukkonen added 2 commits October 29, 2020 20:36
Added ExpiredMetadataError to function documentation where it seems to
be missing.

Corrected the refresh() documentation: ExpiredMetadataError can only
happen when top level metadata does not need to be updated but is
expired. If the metadata gets updated and is expired, the result will
be a NoWorkingMirror with ExpiredMetadata inside it.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
Instead of sleeping, mock time.time() so Updater thinks it lives in the
future.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
Copy link
Collaborator

@MVrachev MVrachev left a comment

Choose a reason for hiding this comment

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

Really liked this pr!
A perfect place to use mocking and the time is decreased by a significant margin!
LGTM!

Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Nice set of changes here, thanks @jku !

Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, @jku! This is great work! 🎉

@lukpueh lukpueh merged commit 6cb9d45 into theupdateframework:develop Nov 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants