mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-18 23:28:14 +08:00
Refactor CircuitBreaker Pattern
Add Qos Config in ReRoute And Refactor CircuitBreakingDelegatingHandler
This commit is contained in:
@ -72,7 +72,7 @@ namespace Ocelot.UnitTests.Request
|
||||
|
||||
this.Given(x => x.GivenTheDownStreamUrlIs("any old string"))
|
||||
.And(x => x.GivenTheDownStreamRouteIs(downstreamRoute))
|
||||
.And(x => x.GivenTheRequestBuilderReturns(new Ocelot.Request.Request(new HttpRequestMessage(), new CookieContainer())))
|
||||
.And(x => x.GivenTheRequestBuilderReturns(new Ocelot.Request.Request(new HttpRequestMessage(), new CookieContainer(),new Values.QoS(3, 8 ,5000, Polly.Timeout.TimeoutStrategy.Pessimistic))))
|
||||
.When(x => x.WhenICallTheMiddleware())
|
||||
.Then(x => x.ThenTheScopedDataRepositoryIsCalledCorrectly())
|
||||
.BDDfy();
|
||||
@ -91,7 +91,7 @@ namespace Ocelot.UnitTests.Request
|
||||
_request = new OkResponse<Ocelot.Request.Request>(request);
|
||||
_requestBuilder
|
||||
.Setup(x => x.Build(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<Stream>(), It.IsAny<IHeaderDictionary>(),
|
||||
It.IsAny<IRequestCookieCollection>(), It.IsAny<QueryString>(), It.IsAny<string>(), It.IsAny<Ocelot.RequestId.RequestId>()))
|
||||
It.IsAny<IRequestCookieCollection>(), It.IsAny<QueryString>(), It.IsAny<string>(), It.IsAny<Ocelot.RequestId.RequestId>(),It.IsAny<Values.QoS>()))
|
||||
.ReturnsAsync(_request);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user