Skip to content

Commit

Permalink
Continue to experience intermittent failures on Github.
Browse files Browse the repository at this point in the history
Receiving this error
"System.AggregateException : One or more hosted services failed to stop. (Not started. Call Start first"
From tests using WebApplicationFactory .
Info here: dotnet/aspnetcore#38649
And possible solution here:  https://github.com/dotnet/aspnetcore/pull/23761/files
  • Loading branch information
JosephEShook committed May 1, 2023
1 parent 9e1b6c8 commit 2eed40e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions _tests/UdapServer.Tests/NoopHostLifetime.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.Extensions.Hosting;

namespace UdapServer.Tests;
internal class NoopHostLifetime : IHostLifetime
{
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}

public Task WaitForStartAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

0 comments on commit 2eed40e

Please sign in to comment.