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

Update test_update.py to use mock_update_handler #2547

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

narrieta
Copy link
Member

The UpdateTests exercise the code using UpdateHandler.run(), which starts all the background threads. This leads to random errors because these threads can create extra files, log messages, telemetry events, etc.

The mock_update_handler does not start the background threads.

@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #2547 (6274ec5) into develop (e09d449) will decrease coverage by 0.35%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #2547      +/-   ##
===========================================
- Coverage    72.11%   71.76%   -0.36%     
===========================================
  Files          102      102              
  Lines        15314    15314              
  Branches      2426     2426              
===========================================
- Hits         11044    10990      -54     
- Misses        3783     3834      +51     
- Partials       487      490       +3     
Impacted Files Coverage Δ
azurelinuxagent/ga/collect_telemetry_events.py 80.13% <0.00%> (-11.99%) ⬇️
azurelinuxagent/ga/env.py 51.74% <0.00%> (-9.80%) ⬇️
azurelinuxagent/common/interfaces.py 57.14% <0.00%> (-7.15%) ⬇️
azurelinuxagent/ga/send_telemetry_events.py 92.68% <0.00%> (-2.44%) ⬇️
azurelinuxagent/ga/monitor.py 74.41% <0.00%> (-1.75%) ⬇️
azurelinuxagent/ga/remoteaccess.py 88.42% <0.00%> (-1.06%) ⬇️
azurelinuxagent/common/event.py 85.36% <0.00%> (-0.68%) ⬇️
azurelinuxagent/ga/update.py 88.65% <0.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e09d449...6274ec5. Read the comment docs.

@narrieta narrieta merged commit cd4e896 into Azure:develop Apr 12, 2022
@narrieta narrieta deleted the test-update branch April 12, 2022 23:37
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.

3 participants