Repository navigation
KTOR-10160 Fix race condition when initializing SLF4J logger in a bg thread - #6048
Aleksei Tirman (Stexxe) wants to merge 2 commits into
Conversation
…kground thread on Android
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a86bafde7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
| repeat(3_000) { | ||
| if (failures.isNotEmpty()) return@Thread | ||
| runApp(App::class.java, providerLookupDelayMillis = 20) |
There was a problem hiding this comment.
Move the CPU-saturating startup loop into the stress suite
Every ordinary :ktor-utils:jvmTest run now performs 3,000 sequential simulated startups, each spending at least 40 ms in App.run(), while busy-loop threads saturate all available processors. This adds at least roughly two minutes of CPU-saturating work, plus class-loading and scheduling overhead, to the normal test suite. build-logic/src/main/kotlin/ktorbuild/targets/JvmConfig.kt already excludes *StressTest* from jvmTest and provides a separate stressTest task; move this workload there and keep the bounded provider-initialization regression test in the ordinary suite.
Useful? React with 👍 / 👎.
|
Who would've thought getting a logger would be so hard 😅 |
Bruce Hamilton (bjhham)
left a comment
There was a problem hiding this comment.
I think you can probably just drop the expensive test unless there's a better way to verify it
Does it affect the build? |
|
Yeah, it takes 2.5 minutes to run and creates a massive log of output. I don't know if there's a way to test it deterministically without using powermock since it's all static references. |
https://youtrack.jetbrains.com/issue/KTOR-10160