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

Pass exceptions on Faulted Tasks as inner Exceptions. #140

Merged
merged 3 commits into from
Feb 17, 2018

Conversation

cleemullins
Copy link
Contributor

Addresses #135.

Note that while I added tests, I couldn't get a test that actually exercised the new behavior.

The behavior in this new code is clearly better, but how to get these tests to fault while using the standard semantics is complicated.

I would be very interested in seeing a solution to how to test this.

@cleemullins cleemullins added bug Indicates an unexpected problem or an unintended behavior. enhancement help wanted Seeking community assistance with this issue labels Feb 16, 2018
@cleemullins cleemullins added this to the 3/2 milestone Feb 16, 2018
@RyanDawkins
Copy link

RyanDawkins commented Feb 16, 2018

Hey @cleemullins I've got a potential test case that I'm about to PR to your branch if you want to review it. It may make it easier to test your change directly.

Edit here's the PR: #142

Drew Marsh and others added 2 commits February 16, 2018 13:56
 * Some `TestAdapter` methods are creating task continuations of `Task<Task>`, but were not using `.Unwrap()` and so exceptions that might have been thrown by the result `Task` were not being surfaced correctly.
 * Instead of testing `.IsFaulted` and throwing an `Exception` that wraps the antecedent `Tasks` exception manually, just use `Task::Wait` to observe the original exception and naturally propagate that up the chain.
 * Add test that simulates an exception being thrown from `Bot::OnReceive` so we have proper coverage of that scenario.
@cleemullins
Copy link
Contributor Author

Reviews in person with Drew.

@cleemullins cleemullins merged commit 9f72e2e into master Feb 17, 2018
@cleemullins cleemullins deleted the CLM/PassExceptionsOnTaskFaults branch February 17, 2018 08:13
ceciliaavila pushed a commit that referenced this pull request Jun 25, 2019
…issues

[StyleCop] Fix warnings on SlackBotWorker and SlackDialog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. help wanted Seeking community assistance with this issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants