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

Improve Streams SelectAsync. Log errors and improve test #6884

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

Arkatufus
Copy link
Contributor

@Arkatufus Arkatufus commented Aug 16, 2023

close #6877
close #6878

Changes

  • Log errors even when the supervision strategy is resume or restart
  • Add new unit tests for supervision strategies
  • Clean up unit tests

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

if (_decider(e) == Directive.Stop)
FailStage(e);
var strategy = _decider(e);
Log.Error(e, "An exception occured inside SelectAsync while processing message [{0}]. Supervision strategy: {1}", message, strategy);
Copy link
Member

Choose a reason for hiding this comment

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

LGTM - should resolve #6878


var exception = element.Exception;
var strategy = _decider(exception);
Log.Error(exception, "An exception occured inside SelectAsync while executing Task. Supervision strategy: {0}", strategy);
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

}

[Fact]
public async Task A_Flow_with_SelectAsync_must_signal_task_failure()
Copy link
Member

Choose a reason for hiding this comment

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

LGTM - this is exactly the behavior we expect.

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) August 16, 2023 20:40
@Aaronontheweb Aaronontheweb merged commit 982d96d into akkadotnet:dev Aug 16, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants