tests: add kotlinx lincheck scenarios
Ref: #140
I've tried to add a basic, first test, based on their internal test: https://github.com/Kotlin/kotlinx-lincheck/blob/master/src/jvm/test/org/jetbrains/kotlinx/lincheck/test/RunOnceTest.java
The dependency is added like suggested here: https://mvnrepository.com/artifact/org.jetbrains.kotlinx/lincheck/2.12
But I can't make this work for some reason (see CI):
[ERROR] .../LincheckTest.java:[15,1] package org.jetbrains.kotlinx.lincheck.execution does not exist
[ERROR] .../LincheckTest.java:[16,50] package org.jetbrains.kotlinx.lincheck.annotations does not exist
...
I'll appreciate any hint on this
When you define dependency with type pom you define inheritance, but look in errors you get. There is no libraries you've declared, but they are in proper location. The classes are contained in jar file, so you need to import them in your classpath to compile your RunOnceTest.java. Default type of simple dependency is jar, so you should replace the following:
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>lincheck-jvm</artifactId>
<version>[2.12,)</version>
<type>pom</type>
</dependency>
with code:
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>lincheck-jvm</artifactId>
<version>[2.12,)</version>
</dependency>
There are still 2 errors, but they are not related with this issue. Best regards, Krzysztof