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

Clean up SyncJobStatus and add FhirSynchronizer test #2184

Merged
merged 7 commits into from
Sep 26, 2023
Merged

Clean up SyncJobStatus and add FhirSynchronizer test #2184

merged 7 commits into from
Sep 26, 2023

Conversation

omarismail94
Copy link
Contributor

@omarismail94 omarismail94 commented Sep 18, 2023

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2183

Description

  • This PR introduces unit tests for FhirSynchronizer, ensuring that the synchronisation process functions as expected under various conditions.
  • Adding tests led to realising that we can make the SyncJobStatus.Started and SyncJobStatus.Finished objects as opposed to being instantiated each time
  • Create a FhirSynchronizer.syncState property that a caller can listen to without having to tell FhirSynchronizer

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)

Screenshots (if applicable)

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

Copy link
Collaborator

@aditya-07 aditya-07 left a comment

Choose a reason for hiding this comment

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

Just this one comment, otherwise the change looks fine.

Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

the changes itself in this PR are net positive - so i'm happy for this to be merged :) and thanks so much omar for improving our code health!

but please create a new issue if you don't want to aditya's comment in this pr.

@omarismail94 omarismail94 enabled auto-merge (squash) September 26, 2023 16:38
@omarismail94 omarismail94 merged commit 996d13a into google:master Sep 26, 2023
3 checks passed
anchita-g pushed a commit to anchita-g/android-fhir that referenced this pull request Sep 29, 2023
* Clean up SyncJobStatus and add FhirSynchronizer test

* remove changes in MAVM

* refactor more
omarismail94 added a commit that referenced this pull request Oct 26, 2023
* WIP

* test cases

* Adding resource UUID in LocalChangeEntity

* fixing migration tests

* returning resource UUID for insert resource

* Clean up SyncJobStatus and add FhirSynchronizer test (#2184)

* Clean up SyncJobStatus and add FhirSynchronizer test

* remove changes in MAVM

* refactor more

* Consolidator done

* review comments

* adding more tests

* fix failing test cases

* Introducing LocalChangeReference

* Adding LocalChangeDaoTest

* WIP

* added migration and tests for migration

* updating kdoc

* adding database migration

* removing unused refs

* json utils test

* review comments

* addressing review comments

* resolving failing test case

---------

Co-authored-by: Omar Ismail <44980219+omarismail94@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Add tests to sync module classes
4 participants