Skip to content

Commit

Permalink
Increase timeout. Log timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkaye committed May 16, 2022
1 parent 78140af commit 70682b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,10 @@ class CommonTestHelper(context: Context) {
* @throws InterruptedException
*/
fun await(latch: CountDownLatch, timeout: Long? = TestConstants.timeOutMillis) {
assertTrue(latch.await(timeout ?: TestConstants.timeOutMillis, TimeUnit.MILLISECONDS))
assertTrue(
"Timed out after " + timeout + "ms waiting for something to happen. See stacktrace for cause.",
latch.await( timeout ?: TestConstants.timeOutMillis, TimeUnit.MILLISECONDS)
)
}

suspend fun retryPeriodicallyWithLatch(latch: CountDownLatch, condition: (() -> Boolean)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object TestConstants {
const val TESTS_HOME_SERVER_URL = "http://10.0.2.2:8080"

// Time out to use when waiting for server response.
private const val AWAIT_TIME_OUT_MILLIS = 60_000
private const val AWAIT_TIME_OUT_MILLIS = 120_000

// Time out to use when waiting for server response, when the debugger is connected. 10 minutes
private const val AWAIT_TIME_OUT_WITH_DEBUGGER_MILLIS = 10 * 60_000
Expand Down

0 comments on commit 70682b4

Please sign in to comment.