Increase timeout. Log timeout.
This commit is contained in:
parent
78140af3f3
commit
70682b4931
@ -378,7 +378,10 @@ class CommonTestHelper(context: Context) {
|
|||||||
* @throws InterruptedException
|
* @throws InterruptedException
|
||||||
*/
|
*/
|
||||||
fun await(latch: CountDownLatch, timeout: Long? = TestConstants.timeOutMillis) {
|
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)) {
|
suspend fun retryPeriodicallyWithLatch(latch: CountDownLatch, condition: (() -> Boolean)) {
|
||||||
|
@ -23,7 +23,7 @@ object TestConstants {
|
|||||||
const val TESTS_HOME_SERVER_URL = "http://10.0.2.2:8080"
|
const val TESTS_HOME_SERVER_URL = "http://10.0.2.2:8080"
|
||||||
|
|
||||||
// Time out to use when waiting for server response.
|
// 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
|
// 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
|
private const val AWAIT_TIME_OUT_WITH_DEBUGGER_MILLIS = 10 * 60_000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user