Merge "Increase timeout to wait the default network is restored" into main
diff --git a/staticlibs/testutils/devicetests/com/android/testutils/DefaultNetworkRestoreMonitor.kt b/staticlibs/testutils/devicetests/com/android/testutils/DefaultNetworkRestoreMonitor.kt
index 1b709b2..4a594e6 100644
--- a/staticlibs/testutils/devicetests/com/android/testutils/DefaultNetworkRestoreMonitor.kt
+++ b/staticlibs/testutils/devicetests/com/android/testutils/DefaultNetworkRestoreMonitor.kt
@@ -34,7 +34,7 @@
class DefaultNetworkRestoreMonitor(
ctx: Context,
private val notifier: RunNotifier,
- private val timeoutMs: Long = 3000
+ private val timeoutMs: Long = 30_000
) {
var firstFailure: Exception? = null
var initialTransports = 0L
@@ -56,8 +56,8 @@
it.caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)
}
} catch (e: AssertionError) {
- firstFailure = IllegalStateException(desc.methodName +
- " does not restore the default network")
+ firstFailure = IllegalStateException(desc.methodName + " does not restore the" +
+ "default network, initialTransports = $initialTransports", e)
} finally {
cm.unregisterNetworkCallback(cb)
}