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

Upgrading JUnit #1342

Closed
wants to merge 15 commits into from
Closed

Upgrading JUnit #1342

wants to merge 15 commits into from

Conversation

vitorpamplona
Copy link
Collaborator

@vitorpamplona vitorpamplona commented Apr 27, 2022

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

Fixes #1341

Description
Upgrade of JUnit and testing dependencies to 4.13

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

Type

Code health

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).

engine/build.gradle.kts Outdated Show resolved Hide resolved
Comment on lines +197 to +201
const val core = "1.4.1-alpha05"
const val archCore = "2.1.0"
const val extJunit = "1.1.3"
const val rules = "1.4.0"
const val runner = "1.4.0"
const val extJunit = "1.1.4-alpha05"
const val rules = "1.4.1-alpha05"
const val runner = "1.5.0-alpha02"
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we not use alpha?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

4.13 is not available for non-alpha versions yet. Should we wait?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All up-to-date. Should we ship with alpha testing libs? I don't see a big issue with it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

i don't feel this ticket is a priority any more given that we resolved the dependency issue of the common lib. based on that i don't feel there's a rush to upgrade junit to 4.13. we should wait a little bit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

when will we be able to use 4.13 with non-alpha versions of other libs

Copy link
Collaborator Author

@vitorpamplona vitorpamplona May 13, 2022

Choose a reason for hiding this comment

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

Agree, it's not urgent. The major goal for the upgrade is to get the method assertThrows on unit tests. It's useful because the engine throws an exception on read(id) if it can't find the object (as opposed to returning null).

Today, we have to use this verbose version:

assertThat(runCatching { provider.cleanup() }.exceptionOrNull())
      .isInstanceOf(IllegalStateException::class.java)

Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm very surprised using public version 4.13 of junit requires using alpha versions of other libs... this seems totally wrong. is there any documentation on this? any one raised any issues?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure why it surprises you. 4.13 is a somewhat new version. The majority of AndroidX test libs are still on 4.12.

const val fragmentVersion = "1.3.6"
}

const val espresso = "3.4.0"
const val espresso = "3.5.0-alpha05"
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

datacapture/build.gradle.kts Outdated Show resolved Hide resolved
@jingtang10
Copy link
Collaborator

Hi @vitorpamplona - can you please update this PR now that #1353 is merged? Thanks!

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #1342 (c338d85) into master (d52a2ec) will increase coverage by 14.69%.
The diff coverage is n/a.

❗ Current head c338d85 differs from pull request most recent head b11a48d. Consider uploading reports for the commit b11a48d to get more accurate results

@@              Coverage Diff              @@
##             master    #1342       +/-   ##
=============================================
+ Coverage     75.22%   89.91%   +14.69%     
+ Complexity      650      648        -2     
=============================================
  Files           128      129        +1     
  Lines          3943     9874     +5931     
  Branches        721      721               
=============================================
+ Hits           2966     8878     +5912     
- Misses          591      608       +17     
- Partials        386      388        +2     
Impacted Files Coverage Δ
...download/ResourceParamsBasedDownloadWorkManager.kt 85.71% <0.00%> (-5.20%) ⬇️
...c/main/java/com/google/android/fhir/sync/Config.kt 94.73% <0.00%> (ø)
.../fhir/index/SearchParameterRepository_Generated.kt 99.69% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d52a2ec...b11a48d. Read the comment docs.

@Tarun-Bhardwaj Tarun-Bhardwaj added the P3 Low priority issue label Jun 27, 2022
@jingtang10
Copy link
Collaborator

closing this due to it being very old. vitor please feel free to update and reopen.

i'll also try to handle this update in my hapi upadte pr #1616

@jingtang10 jingtang10 closed this Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority issue
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Upgrading JUnit and testing dependencies.
5 participants