JetBrains / lincheck

Framework for testing concurrent data structures
Mozilla Public License 2.0
555 stars 31 forks source link

[Documentation] Can't run the test because of missing TestEngine dependency in build.gradle.kts #189

Closed iluxakom closed 6 months ago

iluxakom commented 1 year ago

https://kotlinlang.org/docs/introduction.html#write-and-run-the-test I was not able to run the test before adding

    testRuntimeOnly("org.junit.vintage:junit-vintage-engine:4.12.3")

into the dependencies section of build.gradle.kts

got this:

Caused by: org.junit.platform.commons.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
    at org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:296)
    at org.junit.platform.launcher.core.DefaultLauncher.<init>(DefaultLauncher.java:48)
    at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:105)
    at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:75)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:97)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
    ... 18 more
mvicsokolova commented 1 year ago

Hi! I've tried out the script from the guide and the build was successful 🤔 Here is the build.gradle file: https://github.com/mvicsokolova/lincheck-workshop/blob/guide-example/build.gradle.kts.

Gradle version is 7.3

ndkoval commented 1 year ago

@iluxakom hi! Did you get this error when running the code in the console or IDEA? Could you please provide all the steps to reproduce the issue?

ndkoval commented 6 months ago

Closed as not reproducable