Пример #1
0
        public void Error408()
        {
            try
            {
                var pipeOut = new MicroservicePipeline("out")
                              .AdjustPolicyMicroservice((p, c) =>
                {
                    p.DispatcherUnresolvedRequestMode = DispatcherUnhandledAction.Ignore;
                    p.DispatcherInvalidChannelMode    = DispatcherUnhandledAction.Ignore;
                })
                ;

                CommandInitiator init;

                pipeOut
                .AddCommandInitiator(out init)
                .AddChannelIncoming((c) => "return")
                .Start();

                var rs = init.Process <string, string>("F1", "F2", "F3", "hello"
                                                       , new RequestSettings()
                {
                    WaitTime = TimeSpan.FromSeconds(5)
                }).Result;

                Assert.IsTrue(rs?.ResponseCode == 408);
            }
            catch (Exception ex)
            {
                throw;
            }
        }