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: Close database connection after test statement. #15640

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

jason-p-pickering
Copy link
Contributor

Use the try-resource pattern to automatically close the database connection during startup.

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #15640 (201ac70) into master (ae674bb) will decrease coverage by 0.01%.
Report is 2 commits behind head on master.
The diff coverage is 50.00%.

@@             Coverage Diff              @@
##             master   #15640      +/-   ##
============================================
- Coverage     66.20%   66.20%   -0.01%     
+ Complexity    31264    31261       -3     
============================================
  Files          3487     3487              
  Lines        129902   129905       +3     
  Branches      15170    15170              
============================================
- Hits          86007    86004       -3     
- Misses        36813    36816       +3     
- Partials       7082     7085       +3     
Flag Coverage Δ
integration 49.77% <50.00%> (-0.01%) ⬇️
integration-h2 32.40% <50.00%> (-0.01%) ⬇️
unit 30.32% <0.00%> (-0.01%) ⬇️

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

Files Coverage Δ
...va/org/hisp/dhis/datasource/DatabasePoolUtils.java 69.32% <50.00%> (-0.68%) ⬇️

... and 2 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 dae3308...201ac70. Read the comment docs.

Copy link
Contributor

@david-mackessy david-mackessy left a comment

Choose a reason for hiding this comment

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

nice

@jason-p-pickering jason-p-pickering merged commit baddaf8 into master Nov 13, 2023
18 checks passed
@jason-p-pickering jason-p-pickering deleted the DHIS2-16145 branch November 13, 2023 09:36
jason-p-pickering added a commit that referenced this pull request Nov 13, 2023
* fix: Close database connection after test statement.
jason-p-pickering added a commit that referenced this pull request Nov 13, 2023
* fix: Close database connection after test statement.
jason-p-pickering added a commit that referenced this pull request Nov 14, 2023
* fix: Close database connection after test statement.
jason-p-pickering added a commit that referenced this pull request Nov 14, 2023
* fix: Close database connection after test statement.
jason-p-pickering added a commit that referenced this pull request Nov 14, 2023
* fix: Close database connection after test statement.
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* fix: Close database connection after test statement.
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