kotest / kotest-gradle-plugin

A gradle plugin for Kotest
https://kotest.io
Apache License 2.0
29 stars 5 forks source link

Tests run fine with gradle, fail within Intellij #6

Closed gudstrand closed 3 years ago

gudstrand commented 3 years ago

Added the plugin to our build.gradle file and was able to run ./gradlew clean build kotest without issue. However when I try to run the kotest task in the IntelliJ gradle panel, or run a kotes with IntelliJ I get the below exception.

Exception in thread "Thread-3121" java.lang.IllegalStateException: id must be defined at io.kotest.gradle.KotestServiceMessageParserCallback.createDescriptor(KotestServiceMessageParserCallback.kt:40) at io.kotest.gradle.KotestServiceMessageParserCallback.notifyBeforeTestSuite(KotestServiceMessageParserCallback.kt:72) at io.kotest.gradle.KotestServiceMessageParserCallback.serviceMessage(KotestServiceMessageParserCallback.kt:33) at jetbrains.buildServer.messages.serviceMessages.ServiceMessagesParser.parse(ServiceMessagesParser.java:54) at io.kotest.gradle.Kotest$rerouteTeamCityListener$1.invoke(Kotest.kt:97) at io.kotest.gradle.Kotest$rerouteTeamCityListener$1.invoke(Kotest.kt:24) at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Task :kotest Could not read standard output of command '/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java'. java.io.IOException: Pipe closed at java.base/java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:260) at java.base/java.io.PipedInputStream.receive(PipedInputStream.java:226) at java.base/java.io.PipedOutputStream.write(PipedOutputStream.java:149) at org.gradle.process.internal.streams.ExecOutputHandleRunner.forwardContent(ExecOutputHandleRunner.java:67) at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:53) at org.gradle.internal.operations.CurrentBuildOperationPreservingRunnable.run(CurrentBuildOperationPreservingRunnable.java:42) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.base/java.lang.Thread.run(Thread.java:834)

sksamuel commented 3 years ago

Do you mean running via the plugin, or running via the gradle tool window ?

gudstrand commented 3 years ago

If I go to a shell prompt, all works fine. If I use the graadle tool window it fails, If I run a test via the run configuration window, they faill. Both fail with the error above.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.