mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 09:18:16 +08:00
wip: modifications to service discovery acceptance test to see if it will work on mac
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user