Debugging xds_end2endtest DropTest Update by sending more initial

traffic.
pull/22457/head
Donna Dionne 5 years ago
parent 8c006b1d8e
commit ac79383583
  1. 4
      test/cpp/end2end/xds_end2end_test.cc

@ -2855,7 +2855,7 @@ TEST_P(DropTest, DropPerTenThousand) {
TEST_P(DropTest, Update) { TEST_P(DropTest, Update) {
SetNextResolution({}); SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers(); SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 1000; const size_t kNumRpcs = 3000;
const uint32_t kDropPerMillionForLb = 100000; const uint32_t kDropPerMillionForLb = 100000;
const uint32_t kDropPerMillionForThrottle = 200000; const uint32_t kDropPerMillionForThrottle = 200000;
const double kDropRateForLb = kDropPerMillionForLb / 1000000.0; const double kDropRateForLb = kDropPerMillionForLb / 1000000.0;
@ -2888,6 +2888,7 @@ TEST_P(DropTest, Update) {
gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH ==========");
// The drop rate should be roughly equal to the expectation. // The drop rate should be roughly equal to the expectation.
double seen_drop_rate = static_cast<double>(num_drops) / kNumRpcs; double seen_drop_rate = static_cast<double>(num_drops) / kNumRpcs;
gpr_log(GPR_INFO, "First batch drop rate %f", seen_drop_rate);
const double kErrorTolerance = 0.3; const double kErrorTolerance = 0.3;
EXPECT_THAT( EXPECT_THAT(
seen_drop_rate, seen_drop_rate,
@ -2936,6 +2937,7 @@ TEST_P(DropTest, Update) {
gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH =========="); gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH ==========");
// The new drop rate should be roughly equal to the expectation. // The new drop rate should be roughly equal to the expectation.
seen_drop_rate = static_cast<double>(num_drops) / kNumRpcs; seen_drop_rate = static_cast<double>(num_drops) / kNumRpcs;
gpr_log(GPR_INFO, "Second batch drop rate %f", seen_drop_rate);
EXPECT_THAT( EXPECT_THAT(
seen_drop_rate, seen_drop_rate,
::testing::AllOf( ::testing::AllOf(

Loading…
Cancel
Save