Skip to content

Third time's the charm #3753

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

Merged
merged 1 commit into from
May 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kotlinx-coroutines-test/common/src/TestBuilders.kt
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,6 @@ internal expect fun dumpCoroutines()
public fun TestScope.runTestLegacy(
dispatchTimeoutMs: Long,
testBody: suspend TestScope.() -> Unit,
unused1: Int,
marker: Int,
unused2: Any?,

Choose a reason for hiding this comment

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

Maybe rename the parameters to mask: Int, marker: Any?.

Choose a reason for hiding this comment

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

Ah, I'm too slow. Well it shouldn't really matter.

Copy link
Collaborator Author

@dkhalanskyjb dkhalanskyjb May 12, 2023

Choose a reason for hiding this comment

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

I disagree. unused2 lends this function some tongue-in-a-cheek charm, which it deserves.

): TestResult = runTest(dispatchTimeoutMs, testBody)
): TestResult = runTest(dispatchTimeoutMs = if (marker and 1 != 0) dispatchTimeoutMs else 60_000L, testBody)