Debugger: Remove flaky sleep-based stepping tests

This commit is contained in:
Yan Zhulanow
2020-01-15 21:48:05 +09:00
parent 01a6e7abf3
commit 9cba72d5dd
15 changed files with 0 additions and 280 deletions
@@ -1,35 +0,0 @@
// ATTACH_LIBRARY: coroutines
package soSuspendableCallInEndOfLambda
import forTests.builder
import forTests.WaitFinish
import kotlin.coroutines.Continuation
import kotlin.coroutines.*
private fun foo(a: Any) {}
val waiter = WaitFinish()
fun main(args: Array<String>) {
builder {
foo("Start")
//Breakpoint!
run()
}
foo("Main end")
waiter.waitEnd()
}
suspend fun run() {
suspendCoroutine { cont: Continuation<Unit> ->
Thread {
Thread.sleep(10)
cont.resume(Unit)
waiter.finish()
}.start()
}
}
// STEP_OVER: 2
@@ -1,9 +0,0 @@
LineBreakpoint created at soSuspendableCallInEndOfLambda.kt:18
Run Java
Connected to the target VM
soSuspendableCallInEndOfLambda.kt:18
soSuspendableCallInEndOfLambda.kt:15
soSuspendableCallInEndOfLambda.kt:19
Disconnected from the target VM
Process finished with exit code 0
@@ -1,39 +0,0 @@
// ATTACH_LIBRARY: coroutines
package soSuspendableCallInFun
import forTests.builder
import forTests.WaitFinish
import kotlin.coroutines.Continuation
import kotlin.coroutines.*
private fun foo(a: Any) {}
val waiter = WaitFinish()
fun main(args: Array<String>) {
builder {
inFun()
}
foo("Main end")
waiter.waitEnd()
}
suspend fun inFun() {
//Breakpoint!
run()
foo("End")
}
suspend fun run() {
suspendCoroutine { cont: Continuation<Unit> ->
Thread {
Thread.sleep(10)
cont.resume(Unit)
waiter.finish()
}.start()
}
}
// STEP_OVER: 2
@@ -1,9 +0,0 @@
LineBreakpoint created at soSuspendableCallInFun.kt:25
Run Java
Connected to the target VM
soSuspendableCallInFun.kt:25
soSuspendableCallInFun.kt:23
soSuspendableCallInFun.kt:26
Disconnected from the target VM
Process finished with exit code 0
@@ -1,40 +0,0 @@
// ATTACH_LIBRARY: coroutines
package soSuspendableCallInFunFromOtherStepping
import forTests.builder
import forTests.WaitFinish
import kotlin.coroutines.Continuation
import kotlin.coroutines.*
private fun foo(a: Any) {}
val waiter = WaitFinish()
fun main(args: Array<String>) {
builder {
inFun()
}
foo("Main end")
waiter.waitEnd()
}
suspend fun inFun() {
//Breakpoint!
foo("Start")
run()
foo("End")
}
suspend fun run() {
return suspendCoroutine { cont: Continuation<Unit> ->
Thread {
Thread.sleep(10)
cont.resume(Unit)
waiter.finish()
}.start()
}
}
// STEP_OVER: 3
@@ -1,10 +0,0 @@
LineBreakpoint created at soSuspendableCallInFunFromOtherStepping.kt:25
Run Java
Connected to the target VM
soSuspendableCallInFunFromOtherStepping.kt:25
soSuspendableCallInFunFromOtherStepping.kt:26
soSuspendableCallInFunFromOtherStepping.kt:23
soSuspendableCallInFunFromOtherStepping.kt:27
Disconnected from the target VM
Process finished with exit code 0
@@ -1,35 +0,0 @@
// ATTACH_LIBRARY: coroutines
package soSuspendableCallInLambda
import forTests.builder
import forTests.WaitFinish
import kotlin.coroutines.Continuation
import kotlin.coroutines.*
private fun foo(a: Any) {}
val waiter = WaitFinish()
fun main(args: Array<String>) {
builder {
//Breakpoint!
run()
foo("End")
}
foo("Main end")
waiter.waitEnd()
}
suspend fun run() {
suspendCoroutine { cont: Continuation<Unit> ->
Thread {
Thread.sleep(10)
cont.resume(Unit)
waiter.finish()
}.start()
}
}
// STEP_OVER: 2
@@ -1,9 +0,0 @@
LineBreakpoint created at soSuspendableCallInLambda.kt:17
Run Java
Connected to the target VM
soSuspendableCallInLambda.kt:17
soSuspendableCallInLambda.kt:15
soSuspendableCallInLambda.kt:18
Disconnected from the target VM
Process finished with exit code 0
@@ -1,42 +0,0 @@
// ATTACH_LIBRARY: coroutines
package sofSuspendableCallInFun
import forTests.builder
import forTests.WaitFinish
import kotlin.coroutines.Continuation
import kotlin.coroutines.*
private fun foo(a: Any) {}
val waiter = WaitFinish()
fun main(args: Array<String>) {
builder {
inFun()
}
foo("Main end")
waiter.waitEnd()
}
suspend fun inFun() {
//Breakpoint!
run()
foo("End")
}
suspend fun run() {
//Breakpoint!
foo("This breakpoint should be skipped")
suspendCoroutine { cont: Continuation<Unit> ->
Thread {
Thread.sleep(10)
cont.resume(Unit)
waiter.finish()
}.start()
}
}
// STEP_OVER_FORCE: 2
@@ -1,10 +0,0 @@
LineBreakpoint created at sofSuspendableCallInFun.kt:25
LineBreakpoint created at sofSuspendableCallInFun.kt:31
Run Java
Connected to the target VM
sofSuspendableCallInFun.kt:25
sofSuspendableCallInFun.kt:23
sofSuspendableCallInFun.kt:26
Disconnected from the target VM
Process finished with exit code 0