[fixit] Increase sleep time for test `ProxyEnd2endTest.RpcDeadlineExpires` to reduce flakiness (#30631)

* Increase sleep time for test `ProxyEnd2endTest.RpcDeadlineExpires`

* Update
pull/30636/head
Cheng-Yu Chung 2 years ago committed by GitHub
parent 02df22f52f
commit dca225be95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      test/cpp/end2end/end2end_test.cc

@ -1561,15 +1561,15 @@ TEST_P(ProxyEnd2endTest, RpcDeadlineExpires) {
EchoResponse response; EchoResponse response;
request.set_message("Hello"); request.set_message("Hello");
request.mutable_param()->set_skip_cancelled_check(true); request.mutable_param()->set_skip_cancelled_check(true);
// Let server sleep for 40 ms first to guarantee expiry. // Let server sleep for 4 secs first to guarantee expiry.
// 40 ms might seem a bit extreme but the timer manager would have been just // 4 secs might seem a bit extreme but the timer manager would have been just
// initialized (when ResetStub() was called) and there are some warmup costs // initialized (when ResetStub() was called) and there are some warmup costs
// i.e the timer thread many not have even started. There might also be other // i.e the timer thread many not have even started. There might also be other
// delays in the timer manager thread (in acquiring locks, timer data // delays in the timer manager thread (in acquiring locks, timer data
// structure manipulations, starting backup timer threads) that add to the // structure manipulations, starting backup timer threads) that add to the
// delays. 40ms is still not enough in some cases but this significantly // delays. 4 secs might be still not enough in some cases but this
// reduces the test flakes // significantly reduces the test flakes
request.mutable_param()->set_server_sleep_us(40 * 1000); request.mutable_param()->set_server_sleep_us(4 * 1000 * 1000);
ClientContext context; ClientContext context;
std::chrono::system_clock::time_point deadline = std::chrono::system_clock::time_point deadline =

Loading…
Cancel
Save