kotest / kotest-intellij-plugin

The official Kotest plugin for Intellij and Android Studio
Apache License 2.0
173 stars 19 forks source link

Running a "FreeSpec" causes "Test framework quit unexpectedly" error #92

Closed Obirah closed 4 years ago

Obirah commented 4 years ago

When I run any "FreeSpec" (no matter if it's nested or not) from IntelliJ (no matter if it's the whole spec or a single test), I get a "Test framework quit unexpectedly" error with the following versions:

OS: MacOS 10.15.6 Java: 14 IntelliJ: 2020.2.1 KoTest: 4.2.2 KoTest Plugin: 1.1.16-IC-2020.1

Running the same "FreeSpec" from gradle works without any problems, so I guess it must have something to do with the plugin.

On the contrary, when I run a "StringSpec" from IntelliJ everything works as expected.

If I downgrade KoTest to 4.2.0.RC2, running the "FreeSpec" from IntelliJ works again.

sksamuel commented 4 years ago

Can you paste me the end of the classpath string. Should look something like this: io.kotest.engine.launcher.MainKt --spec com.sksamuel.kotest.assertions.AssertionCounterFreeSpecTest --testpath container should not need to have an assertion --reporter teamcity

On Thu, 27 Aug 2020 at 04:04, Thomas Krause notifications@github.com wrote:

When I run any "FreeSpec" (no matter if it's nested or not) from IntelliJ (no matter if it's the whole spec or a single test), I get a "Test framework quit unexpectedly" error with the following versions:

OS: MacOS 10.15.6 Java: 14 IntelliJ: 2020.2.1 KoTest: 4.2.2 KoTest Plugin: 1.1.16-IC-2020.1

Running the same "FreeSpec" from gradle works without any problems, so I guess it must have something to do with the plugin.

On the contrary, when I run a "StringSpec" from IntelliJ everything works as expected.

If I downgrade KoTest to 4.2.0.RC2, running the "FreeSpec" from IntelliJ works again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/92, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGWC5EHHFPKZYVS3MI3SCYOTDANCNFSM4QMX5NKQ .

Obirah commented 4 years ago

Sure, here you go: io.kotest.engine.launcher.MainKt --spec de.db.dbcs.dpp.BugSpec --reporter teamcity

sksamuel commented 4 years ago

That looks fine, shouldn't cause the Test framework quit unexpectedly error. Are you sure there's no earlier versions of kotest floating about in the build ?

On Thu, 27 Aug 2020 at 10:50, Thomas Krause notifications@github.com wrote:

Sure, here you go: io.kotest.engine.launcher.MainKt --spec de.db.dbcs.dpp.BugSpec --reporter teamcity

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/92#issuecomment-682033959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGQ7345JN5NR2RNTR5LSCZ6EHANCNFSM4QMX5NKQ .

Obirah commented 4 years ago

Yeah, I'm pretty sure. I did both a ./gradlew clean and ./gradlew build --refresh-dependencies. Also deleted the build directory of the project and deleted the IntelliJ run configurations and let them be recreated.

Is there any other spot that requires cleanup I might be missing?

sksamuel commented 4 years ago

No, I don't think it's cleanup. This error might happen if your test was throwing an error at instantiation time.

Can you do something like

class Foo : FreeSpec() { init { "a" - { "b" { } } } }

And see what happens on that test ?

On Thu, 27 Aug 2020 at 16:11, Thomas Krause notifications@github.com wrote:

Yeah, I'm pretty sure. I did both a ./gradlew clean and ./gradlew build --refresh-dependencies. Also deleted the build directory of the project and deleted the IntelliJ run configurations and let them be recreated.

Is there any other spot that requires cleanup I might be missing?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/92#issuecomment-682192784, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGV3SB3CXRUJ2PZ2O6TSC3DWZANCNFSM4QMX5NKQ .

Obirah commented 4 years ago

This results in the same "Test framework quit unexpectedly" error. Also, it doesn't matter which part of the test I execute - I tried all three possibilities:

io.kotest.engine.launcher.MainKt --spec de.db.dbcs.dpp.Foo --reporter teamcity io.kotest.engine.launcher.MainKt --spec de.db.dbcs.dpp.Foo --testpath a --reporter teamcity io.kotest.engine.launcher.MainKt --spec de.db.dbcs.dpp.Foo --testpath a -- b --reporter teamcity

huehnerlady commented 4 years ago

HI, I have the same problem, I use intellij 2020.2.1 kotest plugin 1.1.16-IC-2020.1 kotest: 4.2.0 Java 14 kotlin 1.4.0 OS: MacOS 10.15.5

sksamuel commented 4 years ago

Try 4.2.2 Ruth.

On Fri, 28 Aug 2020, 06:29 Ruth, notifications@github.com wrote:

HI, I have the same problem, I use intellij 2020.2.1 kotest plugin 1.1.16-IC-2020.1 kotest: 4.2.0 Java 14 kotlin 1.4.0 OS: MacOS 10.15.5

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/92#issuecomment-682474208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGRRU2FBEBJ2M4WNPCDSC6IIJANCNFSM4QMX5NKQ .

huehnerlady commented 4 years ago

@sksamuel it is as @Obirah says, same problem, with 4.2.0.RC2 it works, from 4.2.0.RC3 upwards it does not work anymore

running with gradle all versions work though, so I agree it seems to be the plugin

huehnerlady commented 4 years ago

@sksamuel will this be fixed soon? This is a very very irritating error...

huehnerlady commented 4 years ago

@Obirah can you try 4.2.3? Just came out moments ago. I tried it and so far I do not have that problem anymore :)

Obirah commented 4 years ago

Ah cool, everything works, yes. Thank you for the information. :)

sksamuel commented 4 years ago

Yay.

On Tue, 1 Sep 2020 at 08:19, Thomas Krause notifications@github.com wrote:

Ah cool, everything works, yes. Thank you for the information. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/92#issuecomment-684847294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGSK7HIFKKDVLLV2O3TSDTYHDANCNFSM4QMX5NKQ .