Feature/timeout for http client (#319)

* #318 http client obeys Qos timeout or defaults to 90 seconds, which is think is default for http client anyway but zero docs....

* #318 updated docs to specify default timeout and make it clear how to set it on a ReRoute basis

* #318 missed this

* #318 missed this
This commit is contained in:
Tom Pallister
2018-04-18 15:24:16 +01:00
committed by GitHub
parent f9dc8659c0
commit 5e1605882b
11 changed files with 236 additions and 51 deletions

View File

@ -14,6 +14,8 @@ using static Rafty.Infrastructure.Wait;
namespace Ocelot.AcceptanceTests
{
using Xunit.Abstractions;
public class ButterflyTracingTests : IDisposable
{
private IWebHost _serviceOneBuilder;
@ -23,9 +25,11 @@ namespace Ocelot.AcceptanceTests
private string _downstreamPathOne;
private string _downstreamPathTwo;
private int _butterflyCalled;
private readonly ITestOutputHelper _output;
public ButterflyTracingTests()
public ButterflyTracingTests(ITestOutputHelper output)
{
_output = output;
_steps = new Steps();
}
@ -104,7 +108,9 @@ namespace Ocelot.AcceptanceTests
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Tom"))
.BDDfy();
var commandOnAllStateMachines = WaitFor(10000).Until(() => _butterflyCalled == 4);
var commandOnAllStateMachines = WaitFor(10000).Until(() => _butterflyCalled >= 4);
_output.WriteLine($"_butterflyCalled is {_butterflyCalled}");
commandOnAllStateMachines.ShouldBeTrue();
}