wip: modifications to service discovery acceptance test to see if it will work on mac

This commit is contained in:
TomPallister
2017-02-05 21:35:50 +00:00
parent 932bcb73d4
commit d91242ac2c
3 changed files with 28 additions and 6 deletions

View File

@ -160,12 +160,21 @@ namespace Ocelot.AcceptanceTests
for (int i = 0; i < times; i++)
{
tasks[i] = _ocelotClient.GetAsync(url);
var urlCopy = url;
tasks[i] = GetForServiceDiscoveryTest(urlCopy);
}
Task.WaitAll(tasks);
}
private async Task GetForServiceDiscoveryTest(string url)
{
var response = await _ocelotClient.GetAsync(url);
var content = await response.Content.ReadAsStringAsync();
var count = int.Parse(content);
count.ShouldBeGreaterThan(0);
}
public void WhenIGetUrlOnTheApiGateway(string url, string requestId)
{
_ocelotClient.DefaultRequestHeaders.TryAddWithoutValidation(RequestIdKey, requestId);