mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
Fix more test-related build warnings
This commit is contained in:
parent
84743ede0e
commit
c70a90f415
@ -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];
|
||||
|
||||
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user