From da75a64743ee40bba1b8b815a73b91339749de5e Mon Sep 17 00:00:00 2001 From: Ben Frank Date: Fri, 29 Sep 2023 16:19:54 +0200 Subject: [PATCH] Fix JVM tests --- .../org/islandoftex/arara/core/session/EnvironmentTest.kt | 5 ++--- kotlin-dsl/build.gradle.kts | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/jvmTest/kotlin/org/islandoftex/arara/core/session/EnvironmentTest.kt b/core/src/jvmTest/kotlin/org/islandoftex/arara/core/session/EnvironmentTest.kt index 1063bcc3f..56abd49ca 100644 --- a/core/src/jvmTest/kotlin/org/islandoftex/arara/core/session/EnvironmentTest.kt +++ b/core/src/jvmTest/kotlin/org/islandoftex/arara/core/session/EnvironmentTest.kt @@ -6,8 +6,7 @@ import io.kotest.matchers.collections.shouldContain import io.kotest.matchers.shouldBe import io.kotest.matchers.string.shouldContain import java.util.concurrent.TimeoutException -import kotlin.time.Duration -import kotlin.time.milliseconds +import kotlin.time.Duration.Companion.milliseconds class EnvironmentTest : ShouldSpec({ should("return null on non-existent system variable") { @@ -46,7 +45,7 @@ class EnvironmentTest : ShouldSpec({ } should("error with timeout exception") { val (exit, output) = Environment.executeSystemCommand( - Command(listOf("sleep", "1s")), true, Duration.milliseconds(500) + Command(listOf("sleep", "1s")), true, 500.milliseconds ) exit shouldBe Environment.errorExitStatus output shouldContain TimeoutException::class.java.name diff --git a/kotlin-dsl/build.gradle.kts b/kotlin-dsl/build.gradle.kts index da1964fa6..89b3f693b 100644 --- a/kotlin-dsl/build.gradle.kts +++ b/kotlin-dsl/build.gradle.kts @@ -15,7 +15,6 @@ kotlin { api(kotlin("scripting-jvm-host")) implementation(project(":core")) - implementation(kotlin("script-util")) runtimeOnly(kotlin("compiler-embeddable")) runtimeOnly(kotlin("scripting-dependencies"))