Skip to content

Conversation

@joshschriever
Copy link
Collaborator

🥅 What is the goal?

  • Update Kotlin, bundletool, dexlib, arrow, mockito, etc

💻 How is it implemented?

  • Most of the updates are trivial, excluding arrow
  • The arrow update, for the most part, consists of replacing IO with Either.catch

This should be mostly done, but I'm still testing all the cases

@joshschriever joshschriever marked this pull request as draft May 7, 2021 13:41
Comment on lines +48 to +50
withTimeoutOrNull(timeoutMillis) {
deferred.await()
} ?: AdbTimeoutException().left()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the most part, this works the same as before, but we're now using Left with a specific exception type for timeout, instead of Right with null.

FlagParser().parse(
*listOfNotNull(
"install-apks",
"--timeout-millis=$timeoutMillis",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The new bundletool version added this flag, so we can let it handle timeout itself now, instead of wrapping this in the coroutine timeout stuff.

Comment on lines +35 to +38
is AdbTimeoutException -> {
logger.error("$progress -> ${device.serial}: ${test.classAndMethodName}: TIMED OUT")
TestResult.Failed(null, "Test timed out", device.serial)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Behavior should be exactly the same as before, we're just doing it by checking for the AdbTimeoutException instead of checking for null on the Right.

Copy link

@aballano aballano left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@joshschriever joshschriever marked this pull request as ready for review May 7, 2021 16:08
@joshschriever joshschriever merged commit c3923c4 into main May 7, 2021
@joshschriever joshschriever deleted the update-dependencies branch May 7, 2021 16:13
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.

3 participants