private State Launch(ITestOutputHelper output) { var app = new DaprTestApp(output, "testapp", useAppPort: true); try { var(httpEndpoint, grpcEndpoint) = app.Start(); return(new State() { App = app, HttpEndpoint = httpEndpoint, GrpcEndpoint = grpcEndpoint, Output = output, }); } catch (Exception startException) { try { app.Stop(); throw; } catch (Exception stopException) { throw new AggregateException(startException, stopException); } } }
private State Launch(ITestOutputHelper output, DaprRunConfiguration configuration) { var app = new DaprTestApp(output, configuration.AppId); try { var(httpEndpoint, grpcEndpoint) = app.Start(configuration); return(new State() { App = app, HttpEndpoint = httpEndpoint, GrpcEndpoint = grpcEndpoint, Output = output, }); } catch (Exception startException) { try { app.Stop(); throw; } catch (Exception stopException) { throw new AggregateException(startException, stopException); } } }