示例#1
0
        public override void Initialize()
        {
            // Create the host
            Host          = HostedTestFactory.CreateHost(RunData.Host, RunData.Transport, ScenarioName, RunData.Url);
            Host.Resolver = Resolver;
            Host.Initialize();

            base.Initialize();
        }
示例#2
0
            public async Task AwaitingOnFailedStartAndThenStoppingDoesntHang(HostType hostType, TransportType transportType, MessageBusType messageBusType)
            {
                using (var host = CreateHost(hostType, transportType))
                {
                    host.Initialize(messageBusType: messageBusType);
                    var badConnection = CreateConnection(host, "/ErrorsAreFun");

                    var startTime = DateTime.UtcNow;

                    try
                    {
                        await badConnection.Start(HostedTestFactory.CreateTransport(transportType));
                    }
                    catch
                    {
                        badConnection.Stop();
                        return;
                    }

                    Assert.True(false, "An exception should have been thrown.");
                }
            }