-
Is there a way of way creating unit tests for IDurableOrchestrationContext.CallActivityWithRetryAsync to cover the scenarios where the activity fails? I need to unit test the retry logic, but I can't do something like this:
Because then it is Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'm not an authority on this, but from user-code perspective any Exception from @cgillum did I explain that correctly? Also I've just picked up on this
Do you really need to unit test the retry behaviour of the framework that it actually does the retries? Or do you just need to verify that your mock is called with a correctly configured IMO I don't see the value in testing the framework does its job correctly. You should just focus on testing your user-code paths i.e. what happens when |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, there doesn't appear to be a good way to unit test retry behavior. You may need to instead look into integration tests for this kind of coverage. This is probably something that we should consider improving in the future. |
Beta Was this translation helpful? Give feedback.
Unfortunately, there doesn't appear to be a good way to unit test retry behavior. You may need to instead look into integration tests for this kind of coverage. This is probably something that we should consider improving in the future.