Пример #1
0
        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);
                }
            }
        }
Пример #2
0
        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);
                }
            }
        }
Пример #3
0
 public ServiceInvocationTests(ITestOutputHelper testOutput)
 {
     this.testApp = new DaprTestApp(testOutput, "testapp", true);
 }