Skip to content

Upgrading JUnit #1342

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

Closed
wants to merge 15 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,24 @@ object Dependencies {
const val stax = "1.0-2"
const val sqlcipher = "4.5.0"
const val timber = "5.0.1"
const val truth = "1.0.1"
const val truth = "1.1.3"
const val woodstox = "4.4.1"
const val xerces = "2.11.0"

// Test dependencies

object AndroidxTest {
const val core = "1.4.0"
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"
Comment on lines +200 to +204
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

const val jacoco = "0.8.7"
const val junit = "4.12"
const val junit = "4.13.2"
const val mockitoKotlin = "3.2.0"
const val mockitoInline = "4.0.0"
const val robolectric = "4.7.3"
Expand Down