Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test runs and hangs forever #435

Open
frankcoutinho opened this issue Dec 10, 2024 · 0 comments
Open

Test runs and hangs forever #435

frankcoutinho opened this issue Dec 10, 2024 · 0 comments

Comments

@frankcoutinho
Copy link

frankcoutinho commented Dec 10, 2024

Currently using:
Kotlin version 2.0.21
Lincheck version 2.34

package org.acme

import org.jetbrains.kotlinx.lincheck.annotations.*
import org.jetbrains.kotlinx.lincheck.*
import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.ModelCheckingOptions
import org.junit.jupiter.api.Test
import java.util.UUID

class MyList {

    private val list = mutableListOf<String>()

    fun add(text: String) {
        list.add(text)
    }
}

class BasicTest {

    private val c = MyList()

    @Operation
    fun inc() = c.add("${UUID.randomUUID()}")

    @Test
    fun test() = ModelCheckingOptions().check(this::class)
}

In case gradle build file is needed:

plugins {
    kotlin("jvm") version "2.0.21"
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    testImplementation("org.jetbrains.kotlinx:lincheck:2.34")
    testImplementation(kotlin("test"))
}

tasks.test {
    useJUnitPlatform()
}

kotlin {
    jvmToolchain(21)
}
@frankcoutinho frankcoutinho changed the title Test runs hangs forever Test runs and hangs forever Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant