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

fix: make sure background threads check for not logged in current user #16402

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

netroms
Copy link
Contributor

@netroms netroms commented Feb 2, 2024

Summary

After the user refactoring in #15727, some places where a separate/background thread is accessing the current user, it will fail because they now have to check for absence of/no user, before calling CurrentUserUtil.getCurrentUserDetails/getCurrentUsername.
This PR fixes one such issue in the DefaultMessageService.

Automatic test

MessageServiceTest#testSendMessageWithNoCurrentUser()

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (11dc4f3) 66.68% compared to head (44ba334) 66.70%.
Report is 8 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #16402      +/-   ##
============================================
+ Coverage     66.68%   66.70%   +0.02%     
- Complexity    31767    31780      +13     
============================================
  Files          3529     3530       +1     
  Lines        131105   131169      +64     
  Branches      15263    15272       +9     
============================================
+ Hits          87428    87502      +74     
+ Misses        36555    36542      -13     
- Partials       7122     7125       +3     
Flag Coverage Δ
integration 50.27% <64.70%> (+0.02%) ⬆️
integration-h2 32.61% <52.94%> (+0.01%) ⬆️
unit 30.53% <11.76%> (+<0.01%) ⬆️

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

Files Coverage Δ
...a/org/hisp/dhis/message/DefaultMessageService.java 67.53% <76.47%> (+1.23%) ⬆️

... and 30 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link

sonarcloud bot commented Feb 6, 2024

@netroms netroms merged commit a9f65d5 into master Feb 6, 2024
15 checks passed
@netroms netroms deleted the DHIS2-16727 branch February 6, 2024 10:49
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