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

backport: Use try-with-resources to close BatchHandler #15704

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

jason-p-pickering
Copy link
Contributor

* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager
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

warning The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Merging #15704 (bb0f9a8) into 2.39 (886690f) will increase coverage by 6.18%.
Report is 117 commits behind head on 2.39.
The diff coverage is 67.11%.

Additional details and impacted files
@@             Coverage Diff              @@
##               2.39   #15704      +/-   ##
============================================
+ Coverage     58.58%   64.77%   +6.18%     
- Complexity    25817    28693    +2876     
============================================
  Files          3207     3212       +5     
  Lines        121397   121821     +424     
  Branches      14158    14221      +63     
============================================
+ Hits          71118    78907    +7789     
+ Misses        44340    36427    -7913     
- Partials       5939     6487     +548     
Flag Coverage Δ
integration 48.57% <38.96%> (-0.03%) ⬇️
integration-h2 33.96% <18.58%> (?)
unit 29.54% <44.93%> (+0.16%) ⬆️

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

Files Coverage Δ
...main/java/org/hisp/dhis/appmanager/AppManager.java 100.00% <ø> (ø)
...src/main/java/org/hisp/dhis/category/Category.java 65.21% <100.00%> (ø)
...ava/org/hisp/dhis/common/BaseAnalyticalObject.java 70.95% <100.00%> (+5.81%) ⬆️
...a/org/hisp/dhis/common/BaseIdentifiableObject.java 80.20% <100.00%> (+1.37%) ⬆️
...s-api/src/main/java/org/hisp/dhis/common/Grid.java 0.00% <ø> (ø)
.../src/main/java/org/hisp/dhis/common/QueryItem.java 68.66% <100.00%> (ø)
...isp/dhis/dataapproval/DataApprovalPermissions.java 91.66% <ø> (+22.43%) ⬆️
...rc/main/java/org/hisp/dhis/feedback/ErrorCode.java 100.00% <100.00%> (ø)
...src/main/java/org/hisp/dhis/period/PeriodType.java 85.45% <100.00%> (+1.91%) ⬆️
...rg/hisp/dhis/resourcetable/ResourceTableStore.java 100.00% <ø> (+100.00%) ⬆️
... and 115 more

... and 543 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 ed1dc2f...bb0f9a8. Read the comment docs.

@jason-p-pickering jason-p-pickering merged commit 9a55cc6 into 2.39 Nov 15, 2023
12 checks passed
@jason-p-pickering jason-p-pickering deleted the fix/batch-handler-try-with-resources_2.39 branch November 15, 2023 13:06
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362] (2.39) (#15625)

* fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362]

* fix: test setup

* fix: controller imports use interface not impl

* Use try-with-resources to close BatchHandler (#15661) (#15704)

* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager

---------

Co-authored-by: Jan Bernitt <[email protected]>
jason-p-pickering added a commit that referenced this pull request Nov 16, 2023
* fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362] (2.39) (#15625) (#15710)

* fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362]

* fix: test setup

* fix: controller imports use interface not impl

* Use try-with-resources to close BatchHandler (#15661) (#15704) (#15711)

* Use try-with-resources to close BatchHandler

* Rework test to deal with multi-threading

* Add try-catch to Analytics table manager

---------

Co-authored-by: Jan Bernitt <[email protected]>
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.

2 participants