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

Add coroutine tests from deadlock test repo #531

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

bbrockbernd
Copy link
Collaborator

Closes #492

@bbrockbernd bbrockbernd requested a review from eupp February 18, 2025 13:08
@bbrockbernd bbrockbernd linked an issue Feb 18, 2025 that may be closed by this pull request
@eupp eupp force-pushed the run-with-lincheck-api-coroutines branch from 0545b97 to ee44ac6 Compare February 20, 2025 13:51
@eupp eupp force-pushed the run-with-lincheck-api-coroutines branch from c663b27 to 39a9599 Compare March 3, 2025 18:32
Base automatically changed from run-with-lincheck-api-coroutines to develop March 3, 2025 22:59
@eupp
Copy link
Collaborator

eupp commented Mar 4, 2025

@dmitrii-artuhov please rebase on develop

@dmitrii-artuhov dmitrii-artuhov force-pushed the bbrockbernd/add-coroutine-tests branch from ee50938 to 4d5de12 Compare March 4, 2025 14:50
handler.sendToChannel2()
}

class RunChecker901 : BaseRunCoroutineTests(true) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's rename to something like CoroutineTestXX, with numeration starting from 01.

lateinit var pool: ExecutorCoroutineDispatcher
}
override fun block() {
pool = Executors.newFixedThreadPool(4).asCoroutineDispatcher()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executors.newFixedThreadPool(4).asCoroutineDispatcher().use { pool -> 
    ...
}

to.close()
}

fun main(): Unit = runBlocking(pool) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's check that if runBlocking takes pool as coroutine context, then it should be automatically propogated to launch.

@dmitrii-artuhov dmitrii-artuhov force-pushed the bbrockbernd/add-coroutine-tests branch from 4d5de12 to 603b354 Compare March 4, 2025 15:19
@dmitrii-artuhov dmitrii-artuhov marked this pull request as ready for review March 4, 2025 18:41
@dmitrii-artuhov dmitrii-artuhov requested a review from eupp March 4, 2025 18:41
@dmitrii-artuhov dmitrii-artuhov force-pushed the bbrockbernd/add-coroutine-tests branch from 6338f56 to 1ca09f7 Compare March 6, 2025 12:20
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

Successfully merging this pull request may close these issues.

Add more tests with Kotlin Coroutines
3 participants