Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

tests: add kotlinx lincheck scenarios #150

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lukaszstolarczuk
Copy link
Member

@lukaszstolarczuk lukaszstolarczuk commented Apr 23, 2021

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


This change is Reviewable

Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mvn dependency:get -DrepoUrl=something -Dartifact=org.jetbrains.kotlinx:lincheck-jvm:2.12
I've looked into ~/.m2/repository/org/jetbrains/kotlinx/lincheck-jvm/2.12/lincheck-jvm-2.12.jar
and looks that all directories are in right places. I will compile it.

Reviewed 1 of 2 files at r1.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @lukaszstolarczuk)

@KFilipek
Copy link
Contributor

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

Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r2.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @lukaszstolarczuk)


pmemkv-binding/src/test/java/io/pmem/pmemkv/LincheckTest.java, line 77 at r2 (raw file):

		LinChecker.check(LincheckTest.class);
	}
}

no EOF

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants