mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
[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:
committed by
intellij-monorepo-bot
parent
b05ef09755
commit
cdf0981fd9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user