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
KTOR-5332 Fixes iOS unit test deadlock occurring with DarwinClientEngine #3291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix. Do you mind updating queue in ktor-client-darwin-legacy
module as well?
Sure thing, added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Will merge after CI run
These 4 tests are failing on CI
|
Added fix, tests now running blocking call on testing thread |
I see that code style breaks on imports. Can you fix this too, please? |
Subsystem
ktor-client-darwin
Motivation
About a year ago, a pull request was made to fix iOS engine deadlock happening when running iOS unit tests. Since recently upgrading to the ktor 2.0, our team has begun to experience this issue in our iOS unit tests. Looking at DarwinClientEngine.kt, the request queue does not specify
currentQueue()
like the now deprecated IosClientEngine did prior to the ktor 2.0 update.Solution
Use the current thread for the request queue