mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix SuspendingReadWriteTest#test read action with constraints is cancelled by write and restarted
Dispatch events while the job is active, but no longer than a given timeout GitOrigin-RevId: 4f2f6b8501a76e958a77ebc2a277d840e9b94308
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a82a9e90c2
commit
d7cab98427
+6
-2
@@ -208,8 +208,12 @@ class NonBlocking : SuspendingReadWriteTest() {
|
||||
application.runWriteAction {
|
||||
dumbService.isDumb = false
|
||||
}
|
||||
UIUtil.dispatchAllInvocationEvents() // retry with satisfied constraint, attempt 1
|
||||
job.waitTimeout()
|
||||
// retry with unsatisfied constraint
|
||||
withTimeout(1000) {
|
||||
while (job.isActive && isActive) {
|
||||
UIUtil.dispatchAllInvocationEvents()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun twoAttemptJob(cs: CoroutineScope, constraints: List<ReadConstraint>): Job {
|
||||
|
||||
Reference in New Issue
Block a user