Debugger: Remove flaky sleep-based stepping tests
This commit is contained in:
@@ -193,7 +193,6 @@ fun main(args: Array<String>) {
|
|||||||
)
|
)
|
||||||
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
||||||
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
||||||
model("stepping/stepOverForce", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverForceTest")
|
|
||||||
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
||||||
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ fun main(args: Array<String>) {
|
|||||||
)
|
)
|
||||||
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
||||||
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
||||||
model("stepping/stepOverForce", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverForceTest")
|
|
||||||
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
||||||
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ fun main(args: Array<String>) {
|
|||||||
)
|
)
|
||||||
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
||||||
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
||||||
model("stepping/stepOverForce", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverForceTest")
|
|
||||||
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
||||||
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ fun main(args: Array<String>) {
|
|||||||
)
|
)
|
||||||
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
model("stepping/stepOut", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOutTest")
|
||||||
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
model("stepping/stepOver", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverTest")
|
||||||
model("stepping/stepOverForce", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepOverForceTest")
|
|
||||||
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
model("stepping/filters", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doStepIntoTest")
|
||||||
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
model("stepping/custom", pattern = KT_WITHOUT_DOTS_IN_NAME, testMethod = "doCustomTest")
|
||||||
}
|
}
|
||||||
|
|||||||
-38
@@ -637,26 +637,6 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
|||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soSuspendableCallInEndOfFun.kt");
|
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soSuspendableCallInEndOfFun.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("soSuspendableCallInEndOfLambda.kt")
|
|
||||||
public void testSoSuspendableCallInEndOfLambda() throws Exception {
|
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soSuspendableCallInEndOfLambda.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("soSuspendableCallInFun.kt")
|
|
||||||
public void testSoSuspendableCallInFun() throws Exception {
|
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soSuspendableCallInFun.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("soSuspendableCallInFunFromOtherStepping.kt")
|
|
||||||
public void testSoSuspendableCallInFunFromOtherStepping() throws Exception {
|
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soSuspendableCallInFunFromOtherStepping.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("soSuspendableCallInLambda.kt")
|
|
||||||
public void testSoSuspendableCallInLambda() throws Exception {
|
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soSuspendableCallInLambda.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("stepOverCatchClause.kt")
|
@TestMetadata("stepOverCatchClause.kt")
|
||||||
public void testStepOverCatchClause() throws Exception {
|
public void testStepOverCatchClause() throws Exception {
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/stepOverCatchClause.kt");
|
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/stepOverCatchClause.kt");
|
||||||
@@ -913,24 +893,6 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOverForce")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class StepOverForce extends AbstractKotlinSteppingTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doStepOverForceTest, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInStepOverForce() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOverForce"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("sofSuspendableCallInFun.kt")
|
|
||||||
public void testSofSuspendableCallInFun() throws Exception {
|
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOverForce/sofSuspendableCallInFun.kt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("idea/jvm-debugger/jvm-debugger-test/testData/stepping/filters")
|
@TestMetadata("idea/jvm-debugger/jvm-debugger-test/testData/stepping/filters")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Vendored
-35
@@ -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
|
|
||||||
Vendored
-9
@@ -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
|
|
||||||
-39
@@ -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
|
|
||||||
-9
@@ -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
|
|
||||||
-40
@@ -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
|
|
||||||
-10
@@ -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
|
|
||||||
Vendored
-35
@@ -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
|
|
||||||
Vendored
-9
@@ -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
|
|
||||||
Vendored
-42
@@ -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
|
|
||||||
Vendored
-10
@@ -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
|
|
||||||
Reference in New Issue
Block a user