• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 package kotlinx.coroutines.debug
5 
6 
7 import kotlinx.coroutines.*
8 import kotlinx.coroutines.debug.junit4.*
9 import org.junit.*
10 
11 open class DebugTestBase : TestBase() {
12 
13     @JvmField
14     @Rule
15     val timeout = CoroutinesTimeout.seconds(60)
16 
17     @Before
setUpnull18     open fun setUp() {
19         before()
20         DebugProbes.sanitizeStackTraces = false
21         DebugProbes.enableCreationStackTraces = true
22         DebugProbes.install()
23     }
24 
25     @After
tearDownnull26     fun tearDown() {
27         try {
28             DebugProbes.uninstall()
29         } finally {
30             onCompletion()
31         }
32     }
33 }
34