Remove await Task.FromResult() and unnecessary async modifiers (#16535)

* Remove await Task.FromResult and unnecessary async modifiers

* Remove usage of await Task.WhenAll() to avoid deadlocks

* Fix code formatting

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
Ronald Barendse
2025-03-03 06:47:37 +01:00
committed by GitHub
parent 064a71240e
commit 561d871677
126 changed files with 600 additions and 574 deletions

View File

@@ -31,11 +31,12 @@ public abstract class ManagementApiTest<T> : UmbracoTestServerTestBase
where T : ManagementApiControllerBase
{
[SetUp]
public async Task Setup()
public Task Setup()
{
Client.DefaultRequestHeaders
.Accept
.Add(new MediaTypeWithQualityHeaderValue(MediaTypeNames.Application.Json));
return Task.CompletedTask;
}
protected override void CustomTestAuthSetup(IServiceCollection services)