From 20ad25fb3b0a2068677091d808c8b732c8b66662 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Fri, 16 Oct 2020 11:22:57 +0300 Subject: [PATCH] Disable SecurityManager when IDEA is active Otherwise, we have to keep our coroutine debugger disabled all the time: it attempts to read system property and fails on start --- kotlinx-coroutines-core/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kotlinx-coroutines-core/build.gradle b/kotlinx-coroutines-core/build.gradle index f98f6a529c..29784bffcf 100644 --- a/kotlinx-coroutines-core/build.gradle +++ b/kotlinx-coroutines-core/build.gradle @@ -177,7 +177,9 @@ jvmTest { minHeapSize = '1g' maxHeapSize = '1g' enableAssertions = true - systemProperty 'java.security.manager', 'kotlinx.coroutines.TestSecurityManager' + if (!Idea.active) { // Workaround for KT-42671 + 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.*'