AppMetrics/InfluxDB

Can't Run with TestHost

vinh84 opened this issue · 0 comments

When Use Reporting

app.UseMetricsReporting(lifeTime);
....
.AddReporting(factory => {
                factory.AddConsole();
})

It's oke when run application
But when i run in Test Host (1.1.1)
Microsoft.AspNetCore.TestHost

public class testserver : IDisposable
    {
        private readonly TestServer _server;
        public readonly HttpClient _client;
        public testserver()
        {
            _server = new TestServer(new WebHostBuilder()
                                .UseStartup<Startup>());

            _client = _server.CreateClient();
        }

        public void Dispose()
        {
            _client.Dispose();
            _server.Dispose();
        }
    }

Request Hanged