aboutsummaryrefslogtreecommitdiffstats
path: root/kotlinx-coroutines-debug/test/junit5/RegisterExtensionExample.kt
diff options
context:
space:
mode:
Diffstat (limited to 'kotlinx-coroutines-debug/test/junit5/RegisterExtensionExample.kt')
-rw-r--r--kotlinx-coroutines-debug/test/junit5/RegisterExtensionExample.kt20
1 files changed, 20 insertions, 0 deletions
diff --git a/kotlinx-coroutines-debug/test/junit5/RegisterExtensionExample.kt b/kotlinx-coroutines-debug/test/junit5/RegisterExtensionExample.kt
new file mode 100644
index 00000000..2de6b5b2
--- /dev/null
+++ b/kotlinx-coroutines-debug/test/junit5/RegisterExtensionExample.kt
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
+ */
+
+package kotlinx.coroutines.debug.junit5
+
+import kotlinx.coroutines.*
+import org.junit.jupiter.api.*
+import org.junit.jupiter.api.extension.*
+
+class RegisterExtensionExample {
+ @JvmField
+ @RegisterExtension
+ internal val timeout = CoroutinesTimeoutExtension.seconds(5)
+
+ @Test
+ fun testThatHangs() = runBlocking {
+ delay(Long.MAX_VALUE) // somewhere deep in the stack
+ }
+} \ No newline at end of file