AliSoftware / OHHTTPStubs

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
MIT License
5.03k stars 601 forks source link

Unreliable redirect test #280

Closed Liquidsoul closed 2 years ago

Liquidsoul commented 6 years ago

New Issue Checklist

Environment

Issue Description

Following the introduction of #263 the test - [NSURLSessionTests test_NSURLSessionDefaultConfig_MethodAndDataRetentionOnRedirect] fails most of the time (see @AliSoftware comment). We need to investigate this issue so that we can have a reliable CI.

Liquidsoul commented 6 years ago

Ok, after some investigations this seems related to https://github.com/AliSoftware/OHHTTPStubs/issues/230#issuecomment-378385218

I have experienced the same issues (redirect data without response object) for the failures. So this seems like a NSURLProtocol bug.

So now I see several options:

AliSoftware commented 6 years ago

😢

I think we'll have to go with solution 3 then. I think we could still keep the code handling the redirections, but just document properly that there are issues due to the Apple bug.