implemented a send to self pattern for sticky session timeouts rather than a normal timer

This commit is contained in:
Tom Pallister
2018-05-05 13:43:38 +01:00
parent c041d90e38
commit fb3af754ab
10 changed files with 965 additions and 1017 deletions

View File

@ -280,11 +280,6 @@ namespace Ocelot.IntegrationTests
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
_response = _httpClient.PostAsync(url, content).Result;
var responseContent = _response.Content.ReadAsStringAsync().Result;
//Console.ForegroundColor = ConsoleColor.Green;
//Console.WriteLine(responseContent);
//Console.WriteLine(_response.StatusCode);
//Console.ForegroundColor = ConsoleColor.White;
if(responseContent == "There was a problem. This error message sucks raise an issue in GitHub.")
{
@ -330,12 +325,13 @@ namespace Ocelot.IntegrationTests
{
return false;
}
_token = JsonConvert.DeserializeObject<BearerToken>(responseContent);
var configPath = $"{adminPath}/.well-known/openid-configuration";
response = _httpClient.GetAsync(configPath).Result;
return response.IsSuccessStatusCode;
}
catch(Exception e)
catch(Exception)
{
return false;
}
@ -343,7 +339,6 @@ namespace Ocelot.IntegrationTests
var addToken = WaitFor(20000).Until(() => AddToken());
addToken.ShouldBeTrue();
}
private void GivenThereIsAConfiguration(FileConfiguration fileConfiguration)