mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tests [performanceTesting]: throw on exhausted focus retries so coroutineScope propagates the failure
completeExceptionally on the barrier only unblocks downstream chars via await(), but the launch coroutine itself completed normally — so coroutineScope never saw the failure. Now throw the exception after completing the barrier, ensuring the typing command fails visibly. GitOrigin-RevId: a0bbc1bd5fada3d6bd373cf19c9bc3d6c044bcc2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
14de78a499
commit
e7b6a80b0b
+7
-8
@@ -113,15 +113,14 @@ class DelayTypeCommand(text: String, line: Int) : PlaybackCommandCoroutineAdapte
|
||||
delay(500)
|
||||
}
|
||||
if (!typed) {
|
||||
barriers[i].completeExceptionally(
|
||||
Exception("Focus was lost during typing. Current focus is in: " +
|
||||
withContext(Dispatchers.EDT) {
|
||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().focusOwner?.javaClass ?: "null"
|
||||
}))
|
||||
}
|
||||
else {
|
||||
barriers[i].complete(Unit)
|
||||
val ex = Exception("Focus was lost during typing. Current focus is in: " +
|
||||
withContext(Dispatchers.EDT) {
|
||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().focusOwner?.javaClass ?: "null"
|
||||
})
|
||||
barriers[i].completeExceptionally(ex)
|
||||
throw ex
|
||||
}
|
||||
barriers[i].complete(Unit)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user