PR comments

pull/13663/head
David Garcia Quintas 7 years ago
parent d5ca876b6d
commit 4d9f7f6cf9
  1. 12
      test/cpp/end2end/client_lb_end2end_test.cc

@ -588,13 +588,13 @@ TEST_F(ClientLbEnd2endTest, RoundRobinReresolve) {
gpr_log(GPR_INFO, "****** SERVERS RESTARTED *******");
gpr_log(GPR_INFO, "****** SENDING REQUEST TO SUCCEED *******");
// Client request should eventually (but still fairly soon) succeed.
bool call_succeeded = false;
for (gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5);
gpr_time_cmp(deadline, gpr_now(GPR_CLOCK_MONOTONIC)) > 0;) {
call_succeeded = SendRpc().ok();
if (call_succeeded) break;
const gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5);
gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC);
while (gpr_time_cmp(deadline, now) > 0) {
if (SendRpc().ok()) break;
now = gpr_now(GPR_CLOCK_MONOTONIC);
}
GPR_ASSERT(call_succeeded);
GPR_ASSERT(gpr_time_cmp(deadline, now) > 0);
}
} // namespace

Loading…
Cancel
Save