Subito-it / SBTUITestTunnel

Enable network mocks and more in UI Tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when using async/await on tests

simonurzua opened this issue · comments

When I'm marking my tests as async, I'm getting:

libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[UITestTunnelServer] Fail waiting for launch semaphore'
terminating with uncaught exception of type NSException
CoreSimulator 857.14 - Device: iPhone 14 Pro (A92FB5B4-EFAD-4164-9099-1D94DBD26243) - Runtime: iOS 16.2 (20C52) - DeviceType: iPhone 14 Pro

Not sure if async/await feature is currently supported officially by the project.

What I've found is that this block is never executed in the UITest process. Async should be blocking the main thread in some way.

dispatch_async(dispatch_get_main_queue(), ^{

I need to double check async support. In the meantime did you tried to disable the IPC tunneling?

I did it but it was not working. However, even when is possible to use async on UITests, view queries and actions will fail. I don't think we should use async/await on UITests at this time.