diff --git a/modules/scala/integration/src/main/scala/almond/integration/KernelLauncher.scala b/modules/scala/integration/src/main/scala/almond/integration/KernelLauncher.scala index ac3dcb64b..c2f3c072f 100644 --- a/modules/scala/integration/src/main/scala/almond/integration/KernelLauncher.scala +++ b/modules/scala/integration/src/main/scala/almond/integration/KernelLauncher.scala @@ -485,6 +485,7 @@ class KernelLauncher( else Map.empty[String, String] + assert(proc == null) proc = os.proc(command).spawn( cwd = dir, env = extraEnv ++ specExtraEnv, @@ -573,7 +574,8 @@ class KernelLauncher( res } finally { - runner0.close() + if (runner0 != null) + runner0.close() output.close(success = success, printOutputOnError = printOutputOnError) } } diff --git a/modules/scala/launcher/src/main/scala/almond/launcher/Launcher.scala b/modules/scala/launcher/src/main/scala/almond/launcher/Launcher.scala index 3a1148e58..436e245cc 100644 --- a/modules/scala/launcher/src/main/scala/almond/launcher/Launcher.scala +++ b/modules/scala/launcher/src/main/scala/almond/launcher/Launcher.scala @@ -205,6 +205,7 @@ object Launcher extends CaseApp[LauncherOptions] { setDaemon(true) override def run(): Unit = if (p.isAlive()) { + System.err.println("Shutting down underlying kernel") p.close() val timeout = 500.millis if (!p.waitFor(timeout.toMillis)) { @@ -213,6 +214,7 @@ object Launcher extends CaseApp[LauncherOptions] { ) p.destroyForcibly() } + System.err.println("Shut down underlying kernel") } } Runtime.getRuntime.addShutdownHook(hook) diff --git a/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala b/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala index 6a3212288..07d55abd6 100644 --- a/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala +++ b/modules/scala/test-definitions/src/main/scala/almond/integration/Tests.scala @@ -467,6 +467,7 @@ object Tests { scalaCliLauncher.toString, "--power", "compile", + "--server=false", "--print-class-path", "." )