-
Notifications
You must be signed in to change notification settings - Fork 576
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
For asynch parse operations when testing - waitUntilFinished hangs indefinitely #19
Comments
Right, this is working as intended, in the sense that the callbacks for Parse always happen on the main thread, and ST does not have an easy way to make async tests like this. Your solution of having a manual run loop is actually a good way to handle it for tests. That's the way the GHUnit test framework works, for example. But a future update from Parse may make this easier, if callbacks don't have to be on the main thread. |
Thanks - wasn't sure if this was a bug or not. They said they probably On Fri, Feb 21, 2014 at 11:58 AM, Bryan Klimt [email protected]:
|
Of course not sure why an updated SDK couldn't do that. On Sat, Feb 22, 2014 at 5:23 PM, Jim O'Brien [email protected] wrote:
|
Closing this since it seems to be resolved. Feel free to re-open if you think this was a mistake. |
When you use "waitUntilFinished" at the end of a task, the parse completion block for a somethingInBackground is never called. It works with a dispatch semaphore.
The reason why may be that parse block callbacks always occur on the main thread.
Example:
Test:
With semaphore working:
The text was updated successfully, but these errors were encountered: