Am I doing something wrong combining dotMemory, xUnit and async
For me was enough to wrap test in a local function:
public void TestMethod()
{
async Task LocalFunction()
{
// here you can make async calls
await Task.Delay(...);
}
LocalFunction().ConfigureAwait(true).GetAwaiter().GetResult();
}