[fixit] Extend timeout for SameBackendListedMultipleTimes/V3 test (#30716)

Previously this failed 1/1000 times with a 1s timeout, giving a
`Deadline Exceeded` error. I was able to reproduce the failure in
22/1000 times with a 500ms timeout. Changing it to a 2s timeout in this
PR, the failure did not reproduce in 5000 runs.
pull/30731/head
AJ Heller 2 years ago committed by GitHub
parent 892320ad0e
commit f7d8ee068a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      test/cpp/end2end/xds/xds_cluster_end2end_test.cc
  2. 3
      test/cpp/end2end/xds/xds_end2end_test_lib.h

@ -478,7 +478,9 @@ TEST_P(EdsTest, SameBackendListedMultipleTimes) {
EdsResourceArgs args({{"locality0", endpoints}});
balancer_->ads_service()->SetEdsResource(BuildEdsResource(args));
// We need to wait for the backend to come online.
WaitForAllBackends(DEBUG_LOCATION);
WaitForAllBackends(DEBUG_LOCATION, /*start_index=*/0, /*stop_index=*/0,
/*check_status=*/nullptr, WaitForBackendOptions(),
RpcOptions().set_timeout_ms(2000));
// Send kNumRpcsPerAddress RPCs per server.
const size_t kNumRpcsPerAddress = 10;
CheckRpcSendOk(DEBUG_LOCATION, kNumRpcsPerAddress * endpoints.size());

@ -717,6 +717,9 @@ class XdsEnd2endTest : public ::testing::TestWithParam<XdsTestType> {
struct RpcOptions {
RpcService service = SERVICE_ECHO;
RpcMethod method = METHOD_ECHO;
// Dev note: If a timeout or Deadline Exceeded error is occurring in an XDS
// end2end test, consider changing that test's timeout instead of this
// global default.
int timeout_ms = 1000;
bool wait_for_ready = false;
std::vector<std::pair<std::string, std::string>> metadata;

Loading…
Cancel
Save