xref: /aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-debug/test/DebugTestBase.kt (revision 7a7160fed73afa6648ef8aa100d4a336fe921d9a)
1 package kotlinx.coroutines.debug
2 
3 
4 import kotlinx.coroutines.testing.*
5 import kotlinx.coroutines.*
6 import kotlinx.coroutines.debug.junit4.*
7 import org.junit.*
8 
9 open class DebugTestBase : TestBase() {
10 
11     @JvmField
12     @Rule
13     val timeout = CoroutinesTimeout.seconds(60)
14 
15     @Before
setUpnull16     open fun setUp() {
17         before()
18         DebugProbes.sanitizeStackTraces = false
19         DebugProbes.enableCreationStackTraces = false
20         DebugProbes.install()
21     }
22 
23     @After
tearDownnull24     fun tearDown() {
25         try {
26             DebugProbes.uninstall()
27         } finally {
28             onCompletion()
29         }
30     }
31 }
32