Nocilla icon indicating copy to clipboard operation
Nocilla copied to clipboard

Early returning in -[LSHTTPStubURLProtocol startLoading] to prevent failures

Open cristik opened this issue 8 years ago • 0 comments

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.

cristik avatar Nov 11 '17 01:11 cristik