Code coverage is not 100% for asynchronous method with throw exception


Hello ,

I am facing the weird issue wanted to get clarity on this. I have a piece of code that need to be unit test with 100% code coverage .Please find the screenshot of the code below. The unit test is correctly working we are able to see everything get covered. However

SaveCanceledAsync method is an async method so we need to put await in front of the statement Now we see code coverage is not 100% and went down to 99%. Please find the screeshot attached.As you can see line 101 is not covered . Kindly help me understand why this is happening.

1 comment

Hi Vikash Tiwari,

The behaviour you encountered is a known issue DCVR-1577 “catch close brace is not covered”

Please vote or leave a comment to subscribe to the issue and receive updates.


Please sign in to leave a comment.