Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ TEST_P(AdmissionControlIntegrationTest, HttpTest) {

// Drop the success rate to a very low value.
ENVOY_LOG(info, "dropping success rate");
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 300; ++i) {
sendRequestWithReturnCode("500");
}

// Measure throttling rate from the admission control filter.
double throttle_count = 0;
double request_count = 0;
ENVOY_LOG(info, "validating throttling rate");
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 300; ++i) {
auto response = sendRequestWithReturnCode("500");
auto rc = response->headers().Status()->value().getStringView();
if (rc == "503") {
Expand Down Expand Up @@ -133,14 +133,14 @@ TEST_P(AdmissionControlIntegrationTest, GrpcTest) {
initialize();

// Drop the success rate to a very low value.
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 300; ++i) {
sendGrpcRequestWithReturnCode(14);
}

// Measure throttling rate from the admission control filter.
double throttle_count = 0;
double request_count = 0;
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 300; ++i) {
auto response = sendGrpcRequestWithReturnCode(10);

// When the filter is throttling, it returns an HTTP code 503 and the GRPC status is unset.
Expand Down