Skip to content

Commit

Permalink
Remove workaround for KT-42671 that triggers test failures from IDEA …
Browse files Browse the repository at this point in the history
…and access properties in a safe manner from agent premain instead (#2311)
  • Loading branch information
qwwdfsad committed Oct 19, 2020
1 parent 993c192 commit e941da2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions kotlinx-coroutines-core/build.gradle
Expand Up @@ -177,9 +177,7 @@ jvmTest {
minHeapSize = '1g'
maxHeapSize = '1g'
enableAssertions = true
if (!Idea.active) { // Workaround for KT-42671
systemProperty 'java.security.manager', 'kotlinx.coroutines.TestSecurityManager'
}
systemProperty 'java.security.manager', 'kotlinx.coroutines.TestSecurityManager'
// 'stress' is required to be able to run all subpackage tests like ":jvmTests --tests "*channels*" -Pstress=true"
if (!Idea.active && rootProject.properties['stress'] == null) {
exclude '**/*StressTest.*'
Expand Down
4 changes: 2 additions & 2 deletions kotlinx-coroutines-core/jvm/src/debug/AgentPremain.kt
Expand Up @@ -21,9 +21,9 @@ internal object AgentPremain {

public var isInstalledStatically = false

private val enableCreationStackTraces =
private val enableCreationStackTraces = runCatching {
System.getProperty("kotlinx.coroutines.debug.enable.creation.stack.trace")?.toBoolean()
?: DebugProbesImpl.enableCreationStackTraces
}.getOrNull() ?: DebugProbesImpl.enableCreationStackTraces

@JvmStatic
public fun premain(args: String?, instrumentation: Instrumentation) {
Expand Down

0 comments on commit e941da2

Please sign in to comment.