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

Unreliable redirect test #280

Closed
5 tasks done
Liquidsoul opened this issue May 20, 2018 · 2 comments
Closed
5 tasks done

Unreliable redirect test #280

Liquidsoul opened this issue May 20, 2018 · 2 comments
Assignees

Comments

@Liquidsoul
Copy link
Collaborator

New Issue Checklist

Environment

  • version of OHHTTPStubs: master

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 Liquidsoul self-assigned this May 20, 2018
@Liquidsoul
Copy link
Collaborator Author

Ok, after some investigations this seems related to #230 (comment)

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:

  • we find a workaround in the library to make this reliable (that seems unlikely to me)
  • we find a workaround for the tests, but this would mean that client code can fail, and this occurs a lot in the tests in my experience
  • we disable the tests and document that redirections are not correctly supported by OHHTTPStubs because of an Apple bug

@AliSoftware
Copy link
Owner

😢

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants