public async Task After() { await _testServer1?.Host?.StopAsync(); _testServer1?.Dispose(); _grpcChannel1?.Dispose(); TestServer1HttpClient = null; TestServer1GrpcClient = null; await _testServer2?.Host?.StopAsync(); _testServer2?.Dispose(); _grpcChannel2?.Dispose(); TestServer2HttpClient = null; TestServer2GrpcClient = null; }
public async Task Before() { _testServer1 = new TestServer(TestServer1Builder); await _testServer1.Host.StartAsync(); TestServer1HttpClient = _testServer1.CreateClient(); _grpcChannel1 = GrpcChannel.ForAddress("https://localhost:5000", new GrpcChannelOptions { HttpHandler = Hander(_testServer1) }); TestServer1GrpcClient = new Tracer.TracerClient(_grpcChannel1); _testServer2 = new TestServer(TestServer2Builder(Hander(_testServer1))); await _testServer2.Host.StartAsync(); TestServer2HttpClient = _testServer2.CreateClient(); _grpcChannel2 = GrpcChannel.ForAddress("https://localhost:5010", new GrpcChannelOptions { HttpHandler = Hander(_testServer2) }); TestServer2GrpcClient = new Tracer.TracerClient(_grpcChannel2); }
public GrpcService(Tracer.TracerClient client) { _client = client; }