Skip to content
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

Early returning in -[LSHTTPStubURLProtocol startLoading] to prevent failures #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cristik
Copy link

@cristik cristik commented Nov 11, 2017

Since NSURLSession will execute the requests on a background thread, we can end up in the situation when the tearDown of a previous unit test stops Nocilla since it no longer needs it, and startLoading gets called while in the middle of another unrelated test case, thus causing an exception and failing the other test.

So, we're early returning from startLoading to prevent this kind of failures.

…ailures

Since `NSURLSession` will execute the requests on a background thread, we can end up in the situation when the `tearDown` of a previous unit test stops Nocilla since it no longer needs it, and `startLoading` gets called while in the middle of another unrelated test case, thus causing an exception and failing the other test.

So, we're early returning from `startLoading` to prevent this kind of failures.
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.

1 participant