[ui-tests] Force stop configuration

On Linux SIGINT doesn't interrupt the run configuration so force kill is required

GitOrigin-RevId: 7f98a9de1861b6b570834e725406d6cf4388b441
This commit is contained in:
Maxim.Kolmakov
2024-06-25 15:02:16 +02:00
committed by intellij-monorepo-bot
parent b05ef09755
commit cdf0981fd9

View File

@@ -64,6 +64,18 @@ fun <T> waitFor(
}
}
fun <T> retryWithFallback(
fallbackAction: () -> T,
mainAction: () -> T,
): T {
return try {
mainAction()
} catch (_: Exception) {
fallbackAction()
mainAction()
}
}
fun <T> withRetries(times: Int, onError: () -> Unit = {}, f: () -> T): T {
require(times > 0)
var lastException: Exception? = null