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: Include time when filtering in tracker exporter [DHIS2-16019] #15474

Merged
merged 7 commits into from
Oct 27, 2023

Conversation

enricocolasante
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #15474 (74064bc) into master (5b62825) will increase coverage by 0.05%.
Report is 1 commits behind head on master.
The diff coverage is 65.38%.

@@             Coverage Diff              @@
##             master   #15474      +/-   ##
============================================
+ Coverage     66.15%   66.21%   +0.05%     
- Complexity    31176    31213      +37     
============================================
  Files          3485     3485              
  Lines        129745   129739       -6     
  Branches      15134    15134              
============================================
+ Hits          85828    85901      +73     
+ Misses        36830    36753      -77     
+ Partials       7087     7085       -2     
Flag Coverage Δ
integration 49.76% <65.38%> (+0.06%) ⬆️
integration-h2 32.40% <3.84%> (-0.03%) ⬇️
unit 30.33% <3.84%> (+<0.01%) ⬆️

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

Files Coverage Δ
...er/export/enrollment/HibernateEnrollmentStore.java 84.78% <100.00%> (+12.73%) ⬆️
...ort/trackedentity/HibernateTrackedEntityStore.java 67.47% <100.00%> (+9.01%) ⬆️
...rt/trackedentity/TrackedEntityOperationParams.java 80.00% <ø> (ø)
...export/trackedentity/TrackedEntityQueryParams.java 75.34% <100.00%> (+7.34%) ⬆️
...is/program/hibernate/HibernateEnrollmentStore.java 65.14% <0.00%> (+0.37%) ⬆️
...dentity/hibernate/HibernateTrackedEntityStore.java 69.28% <33.33%> (ø)

... and 11 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 d61c516...74064bc. Read the comment docs.

Comment on lines 561 to 564
throws ForbiddenException, NotFoundException, BadRequestException {
Date oneHourBeforeLastUpdated =
Date.from(
trackedEntityA
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not following how this date is supposed to test all changes we are applying. Can we make a test where we actually have a date match? Or maybe there is and i do not see it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are just testing that the filter on updatedAt is working.
We try to get all the TE that were updated in the last hour and we want to assert that they are present.
I am not sure we should assert on the date as the next test is doing the opposite and filter on something that will return no TEs and so there we will not have any date to assert

Copy link
Contributor

Choose a reason for hiding this comment

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

ok but i am a bit surprised that we made these changes and there are no tests failing. So maybe there is no test coverage or it is not fine-grained to time. I see many where conditions are changed now so maybe we could think of some test coverage for that. But maybe i am wrong

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are right.
There are no failures just because this change is not a breaking one, so any case working before is still working but we need to cover more cases.
I am adding the new test cases for all the changes

@sonarqubecloud
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
3.9% 3.9% Duplication

@enricocolasante enricocolasante merged commit 921b4b8 into master Oct 27, 2023
18 checks passed
@enricocolasante enricocolasante deleted the DHIS2-16019 branch October 27, 2023 10:56
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.

4 participants