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

add a test to make sure that future is bound to delegate el #241

Merged
merged 6 commits into from
Jun 13, 2020

Conversation

artemredkin
Copy link
Collaborator

Adds a test to make sure that Task future is bound to delegate EL

Motivation:
Tasks futures have to be bound to delegate EL.

Modifications:
Adds a test case

Result:
Closes #199

@artemredkin artemredkin requested a review from weissi June 12, 2020 20:35

let request = try HTTPClient.Request(url: self.defaultHTTPBinURLPrefix + "/get")
let delegate = ResponseAccumulator(request: request)
let task = client.execute(request: request, delegate: delegate, eventLoop: .delegate(on: el))
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we use .testOnly(delegateOn: el, channelOn: otherEL) here to force a foreign channel?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah, you are right, done, thanks!

Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks

@weissi weissi merged commit 238c653 into swift-server:master Jun 13, 2020
@artemredkin artemredkin deleted the add_test_for_task_promise branch June 13, 2020 11:35
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.

programming model:task.futureResult not bound to desired EL if .delegate(on:) is specified
2 participants