Fix more test-related build warnings

This commit is contained in:
Philip Wood 2017-07-18 10:20:59 +01:00
parent 84743ede0e
commit c70a90f415
2 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,6 @@ using TestStack.BDDfy;
using Xunit;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
using System.Threading;
using System.Collections.Concurrent;
namespace Ocelot.IntegrationTests
@ -23,11 +22,9 @@ namespace Ocelot.IntegrationTests
public class ThreadSafeHeadersTests : IDisposable
{
private readonly HttpClient _httpClient;
private HttpResponseMessage _response;
private IWebHost _builder;
private IWebHostBuilder _webHostBuilder;
private readonly string _ocelotBaseUrl;
private BearerToken _token;
private IWebHost _downstreamBuilder;
private readonly Random _random;
private readonly ConcurrentBag<ThreadSafeHeadersTestResult> _results;
@ -135,7 +132,7 @@ namespace Ocelot.IntegrationTests
text = File.ReadAllText(configurationPath);
}
public void WhenIGetUrlOnTheApiGatewayMultipleTimesWithDifferentHeaderValues(string url, int times)
private void WhenIGetUrlOnTheApiGatewayMultipleTimesWithDifferentHeaderValues(string url, int times)
{
var tasks = new Task[times];

View File

@ -13,6 +13,7 @@ using Ocelot.Logging;
using Shouldly;
using TestStack.BDDfy;
using Xunit;
using System.Threading.Tasks;
namespace Ocelot.UnitTests.Errors
{
@ -67,6 +68,7 @@ namespace Ocelot.UnitTests.Errors
app.UseExceptionHandlerMiddleware();
app.Use(async (context, next) =>
{
await Task.CompletedTask;
throw new Exception("BOOM");
});
});
@ -109,6 +111,7 @@ namespace Ocelot.UnitTests.Errors
app.UseExceptionHandlerMiddleware();
app.Run(async context =>
{
await Task.CompletedTask;
context.Response.StatusCode = 200;
});
});