-
Notifications
You must be signed in to change notification settings - Fork 359
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
chore: feat: add prev/nextPage to /potentialDuplicates DHIS2-19021 #20066
Conversation
c6c2ad0
to
c1ea262
Compare
c1ea262
to
76abfc5
Compare
...e-tracker/src/main/java/org/hisp/dhis/tracker/deduplication/DefaultDeduplicationService.java
Outdated
Show resolved
Hide resolved
...-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/HibernateEnrollmentStore.java
Show resolved
Hide resolved
@@ -0,0 +1,159 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's definitely easier to understand the potential duplicate tests if we use this json, but didn't we say we want to have one json for metadata and one for data only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that every tests requirements should affect all other tests 😅 All the exporter tests we have of which there are many do not need these TEs.
|
getById
get
withoutbyUid
NotFoundException
inget
List
andPage
methodsTests
Extract a
TestSetup
class from TrackerTest.TrackerTest
is not composable. The exporter can be tested using test lifecycle class as most tests can share the same setup and are read only. Code like the deduplication service does read and write. This means we need full control of the test annotations. This is inline with the work we've done on removing the number of test base classes so annotations can live in the test classes themselves.Duplicate
TestSetup
andAssertions
classes so we can use them in ourdhis-test-integration
anddhis-test-web-api
tests. There is no better way right now to share such code. We could only put it intomain
but we do not want to include test code in production code. The other option of adding it intodhis-support-test
introduces cycles. We should revisit our test module arrangement at some point.We can share JSON though via
dhis-support-test
(seetracker/simple_metadata.json
andtracker/deduplication/potential_duplicates.json
).TrackerObjects
to find entities. We are already have them in TrackerBundle. We might be able to remove them when we move to using the importer using the actual importer JSON payload.tracker/deduplication/potential_duplicates.json
. Note that the UIDs of the duplicate TEs match theirtracker/event_and_enrollment.json
counterpart expect for theD
prefix.Next
view/Page
and integrate types wellPageRequestParams
->tracker/PageParams
->tracker/Page
->view/Page
totalPages
?TestSetup
to setup metadata and data in tracker integration testsTestSetup
to setup metadata and data in tracker web api tests