mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger] Fixed the flaky withTimeout test: removed the loop.
IDEA-372151 GitOrigin-RevId: 1dbb4a8fd8ef16a7feaea8f4259167d0a30895d7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
685f9b6c24
commit
f42f4bc465
+11
-8
@@ -6,16 +6,19 @@ import kotlinx.coroutines.*
|
||||
|
||||
fun main() {
|
||||
runBlocking {
|
||||
repeat(10) {
|
||||
launch {
|
||||
withTimeout(10) { //todo withTimeout frame is skipped
|
||||
delay(1)
|
||||
//Breakpoint!
|
||||
println()
|
||||
delay(1)
|
||||
launch {
|
||||
withContext(Dispatchers.Default) {
|
||||
val res = withTimeout(100) {
|
||||
try {
|
||||
//Breakpoint!
|
||||
delay(1)
|
||||
5
|
||||
} catch (e: CancellationException) {
|
||||
-1
|
||||
}
|
||||
}
|
||||
assert(res == 5)
|
||||
}
|
||||
}
|
||||
}
|
||||
println()
|
||||
}
|
||||
+4
-2
@@ -3,12 +3,14 @@ Run Java
|
||||
Connected to the target VM
|
||||
withTimeout.kt:14
|
||||
vvv stack trace vvv
|
||||
invokeSuspend:14, WithTimeoutKt$main$1$1$1$1
|
||||
invokeSuspend:14, WithTimeoutKt$main$1$1$1$res$1
|
||||
invokeSuspend:11, WithTimeoutKt$main$1$1$1
|
||||
invokeSuspend:10, WithTimeoutKt$main$1$1
|
||||
invoke:-1, WithTimeoutKt$main$1$1$1$res$1
|
||||
<hidden frames>
|
||||
-- Async stack trace --
|
||||
<hidden frames>
|
||||
invokeSuspend:10, WithTimeoutKt$main$1
|
||||
invokeSuspend:9, WithTimeoutKt$main$1
|
||||
<hidden frames>
|
||||
-- Async stack trace --
|
||||
<hidden frames>
|
||||
|
||||
Reference in New Issue
Block a user