Skip to content

Commit 617f56b

Browse files
authored
No longer use a SecurityManager during internal testing (#4078)
On some JDK versions, using a security manager crashes the JVM because the Kotlin runtime can't load. Since the security manager API is deprecated anyway and the security manager didn't test anything extremely important, we just remove it.
1 parent d7c1edd commit 617f56b

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

kotlinx-coroutines-core/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ val jvmTest by tasks.getting(Test::class) {
164164
minHeapSize = "1g"
165165
maxHeapSize = "1g"
166166
enableAssertions = true
167-
if (!Idea.active) {
168-
// We should not set this security manager when `jvmTest`
169-
// is invoked by IntelliJ IDEA since we need to pass
170-
// system properties for Lincheck and stress tests.
171-
// TODO Remove once IDEA is smart enough to select between `jvmTest`/`jvmStressTest`/`jvmLincheckTest` #KTIJ-599
172-
systemProperty("java.security.manager", "kotlinx.coroutines.TestSecurityManager")
173-
}
174167
// 'stress' is required to be able to run all subpackage tests like ":jvmTests --tests "*channels*" -Pstress=true"
175168
if (!Idea.active && rootProject.properties["stress"] == null) {
176169
exclude("**/*LincheckTest*")

kotlinx-coroutines-core/jvm/test/TestSecurityManager.kt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)