mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Fix failing tests (#2095)
This commit is contained in:
@ -418,13 +418,10 @@ namespace Bit.Identity.IntegrationTest.Endpoints
|
||||
tasks[i] = MakeRequest();
|
||||
}
|
||||
|
||||
var responses = await Task.WhenAll(tasks);
|
||||
var responses = (await Task.WhenAll(tasks)).ToList();
|
||||
|
||||
var allowedCalls = responses[..AmountInOneSecondAllowed];
|
||||
var notAllowedCall = responses[^1];
|
||||
|
||||
Assert.True(allowedCalls.All(c => c.Response.StatusCode == StatusCodes.Status200OK));
|
||||
Assert.True(notAllowedCall.Response.StatusCode == StatusCodes.Status429TooManyRequests);
|
||||
Assert.Equal(5, responses.Count(c => c.Response.StatusCode == StatusCodes.Status200OK));
|
||||
Assert.Equal(1, responses.Count(c => c.Response.StatusCode == StatusCodes.Status429TooManyRequests));
|
||||
|
||||
Task<HttpContext> MakeRequest()
|
||||
{
|
||||
|
Reference in New Issue
Block a user