AppMetrics / InfluxDB

App Metrics Extensions for InfluxDB reporting
https://www.app-metrics.io/reporting/reporters/influx-data/
Apache License 2.0
17 stars 13 forks source link

Can't Run with TestHost #3

Closed vinh84 closed 7 years ago

vinh84 commented 7 years ago

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