mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rdct-tests]: use setSuspendPreserveClientId with Dispatchers.Default Scheduler for cases when clientId is not critical
GitOrigin-RevId: bf788057a52b62d7d6f17e3dd84f6daa2de3bcc0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
568b5a468a
commit
9d2c0d7e81
+10
-5
@@ -194,8 +194,9 @@ open class DistributedTestHost(coroutineScope: CoroutineScope) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
session.isResponding.setSuspendPreserveClientId { _, _ ->
|
||||
// actually doesn't really preserve clientId, not really important here
|
||||
// https://youtrack.jetbrains.com/issue/RDCT-653/setSuspendPreserveClientId-with-custom-dispatcher-doesnt-preserve-ClientId
|
||||
session.isResponding.setSuspendPreserveClientId(handlerScheduler = Dispatchers.Default.asRdScheduler) { _, _ ->
|
||||
LOG.info("Answering for session is responding...")
|
||||
true
|
||||
}
|
||||
@@ -218,13 +219,17 @@ open class DistributedTestHost(coroutineScope: CoroutineScope) {
|
||||
}
|
||||
}
|
||||
|
||||
session.requestFocus.setSuspendPreserveClientId { _, actionTitle ->
|
||||
withContext(Dispatchers.EDT) {
|
||||
// actually doesn't really preserve clientId, not really important here
|
||||
// https://youtrack.jetbrains.com/issue/RDCT-653/setSuspendPreserveClientId-with-custom-dispatcher-doesnt-preserve-ClientId
|
||||
session.requestFocus.setSuspendPreserveClientId(handlerScheduler = Dispatchers.Default.asRdScheduler) { _, actionTitle ->
|
||||
withContext(Dispatchers.EDT + ModalityState.any().asContextElement()) {
|
||||
requestFocus(actionTitle)
|
||||
}
|
||||
}
|
||||
|
||||
session.makeScreenshot.setSuspendPreserveClientId { _, fileName ->
|
||||
// actually doesn't really preserve clientId, not really important here
|
||||
// https://youtrack.jetbrains.com/issue/RDCT-653/setSuspendPreserveClientId-with-custom-dispatcher-doesnt-preserve-ClientId
|
||||
session.makeScreenshot.setSuspendPreserveClientId(handlerScheduler = Dispatchers.Default.asRdScheduler) { _, fileName ->
|
||||
makeScreenshot(fileName)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user