Skip to content

Conversation

@DangWW
Copy link
Contributor

@DangWW DangWW commented Jan 13, 2025

There seems to be a need for a slight delay for exhausting the main queue when using iOS 18 and xcode 16.
This fix appears to reliably fix expected navigation changes.

I tested here in this PR that had failing tests and they all succeed now.
https://github.com/WW-Digital/ios-mobile/pull/5248

internal func expectMainQueueExhaustion() -> XCTestExpectation {
let exhaustion = expectation(description: "main queue exhaustion")
DispatchQueue.main.async {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1, execute: {

Choose a reason for hiding this comment

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

Nice! Can we make it an even shorter time? Like using this instead:

DispatchQueue.main.asyncAfter(deadline: .now() + .leastNormalMagnitude, execute: {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will test on the PR in WWMobile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it fails unfortunately

@DangWW DangWW merged commit 2f87134 into develop Jan 13, 2025
4 of 8 checks passed
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.

3 participants