I have the following four tests and the last one hangs when I run it. Why does this happen:
[Test] public void CheckOnceResultTest() { Assert.IsTrue(Check
You can avoid deadlock adding ConfigureAwait(false) to this line:
ConfigureAwait(false)
IRestResponse response = await restResponse;
=>
IRestResponse response = await restResponse.ConfigureAwait(false);
I've described this pitfall in my blog post Pitfalls of async/await