Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

tests: ensure chrony syncs time before tests #14888

Closed

Conversation

miguelpires
Copy link
Contributor

@miguelpires miguelpires commented Dec 19, 2024

This fixes tests running on 16.04 that rely on forcing auto-refreshes. These were failing because on Xenial chrony would sometimes exit without synchronizing time (unsure why at the moment). Since the auto-refresh manager waits for an NTP sync (times out after a while but too late for testing purposes), the auto-refreshes were never triggered and the tests failed.

- google:ubuntu-16.04-64:tests/main/auto-refresh-backoff
- google:ubuntu-16.04-64:tests/main/auto-refresh-gating-from-snap
- google:ubuntu-16.04-64:tests/main/auto-refresh-pre-download:close
- google:ubuntu-16.04-64:tests/main/auto-refresh-pre-download:close_mid_restart
- google:ubuntu-16.04-64:tests/main/auto-refresh-pre-download:ignore
- google:ubuntu-16.04-64:tests/main/auto-refresh-retry
- google:ubuntu-16.04-64:tests/main/auto-refresh:regular
- google:ubuntu-16.04-64:tests/main/snap-refresh-hold
- google:ubuntu-16.04-64:tests/main/snapd-state

Copy link
Contributor

@maykathm maykathm left a comment

Choose a reason for hiding this comment

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

thanks

Copy link
Member

@olivercalder olivercalder left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.30%. Comparing base (24a0034) to head (35f2de7).
Report is 76 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14888      +/-   ##
==========================================
+ Coverage   78.20%   78.30%   +0.10%     
==========================================
  Files        1151     1153       +2     
  Lines      151396   152626    +1230     
==========================================
+ Hits       118402   119517    +1115     
- Misses      25662    25743      +81     
- Partials     7332     7366      +34     
Flag Coverage Δ
unittests 78.30% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This fixes tests running on 16.04 that rely on forcing auto-refreshes.
These were failing because 16.04 uses chrony which wasn't being run.
Since the auto-refresh manager waits for an NTP sync (times out after a
while but too late for testing purposes), the auto-refreshes were never
triggered and the tests failed.

```
- google:ubuntu-16.04-64:tests/main/auto-refresh-backoff
- google:ubuntu-16.04-64:tests/main/auto-refresh-gating-from-snap
- google:ubuntu-16.04-64:tests/main/auto-refresh-pre-download:close
- google:ubuntu-16.04-64:tests/main/auto-refresh-pre-download:close_mid_restart
- google:ubuntu-16.04-64:tests/main/auto-refresh-pre-download:ignore
- google:ubuntu-16.04-64:tests/main/auto-refresh-retry
- google:ubuntu-16.04-64:tests/main/auto-refresh:regular
- google:ubuntu-16.04-64:tests/main/snap-refresh-hold
- google:ubuntu-16.04-64:tests/main/snapd-state
```

Signed-off-by: Miguel Pires <[email protected]>
@miguelpires
Copy link
Contributor Author

While investigating a different spread failure, I got some for information about the root cause of this issue. This might be replaced by another PR that fixes other tests as well, marking as Blocked for now

@miguelpires
Copy link
Contributor Author

replaced by #14905

@miguelpires miguelpires closed this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants