Skip to content

core/ios: convert EnvoyHTTPStream to a protocol & fix tests#382

Merged
rebello95 merged 5 commits intomasterfrom
httpstream
Sep 3, 2019
Merged

core/ios: convert EnvoyHTTPStream to a protocol & fix tests#382
rebello95 merged 5 commits intomasterfrom
httpstream

Conversation

@rebello95
Copy link
Copy Markdown
Contributor

#381 surfaced an issue where extensions aren't allowed on Swift protocols that are visible to Objective-C. This meant that the Swift Client protocol (conformed to by the Envoy Swift class) could not provide a default implementation of the non-streaming send function, and the function had to be moved into the concrete Envoy class so that it could be visible from both Swift and Objective-C. This ended up breaking our Swift tests in ClientTests.swift (as mentioned in that PR's description).

In order to fix these tests, we need to convert EnvoyHTTPStream into a protocol and use an EnvoyHTTPStreamImpl concrete type - similarly to how we do with EnvoyEngine/EnvoyEngineImpl.

This PR updates the types accordingly, and fixes the tests. Also renames the tests to EnvoyTests rather than ClientTests since this is testing the concrete type.

Signed-off-by: Michael Rebello me@michaelrebello.com

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: Michael Rebello <me@michaelrebello.com>
@rebello95 rebello95 requested review from goaway and junr03 August 23, 2019 21:23
@goaway
Copy link
Copy Markdown
Contributor

goaway commented Aug 27, 2019

Looks good, just a minor suggestion (and needs a merge/rebase).

Copy link
Copy Markdown
Contributor

@goaway goaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Above)

@stale
Copy link
Copy Markdown

stale bot commented Sep 3, 2019

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Sep 3, 2019
Signed-off-by: Michael Rebello <me@michaelrebello.com>
@stale stale bot removed the stale label Sep 3, 2019
Signed-off-by: Michael Rebello <me@michaelrebello.com>
@rebello95
Copy link
Copy Markdown
Contributor Author

Thanks for reviewing @goaway - ready for another look

@rebello95 rebello95 requested a review from goaway September 3, 2019 17:06
Copy link
Copy Markdown
Contributor

@goaway goaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@rebello95 rebello95 merged commit 75977bd into master Sep 3, 2019
@rebello95 rebello95 deleted the httpstream branch September 3, 2019 22:09
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.

2 participants